Skip to content

Commit

Permalink
perf: 修改act 上报字段
Browse files Browse the repository at this point in the history
  • Loading branch information
Chryseis committed Dec 17, 2021
1 parent 0917df5 commit e95cd69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/web-performance/src/metrics/getCCP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const afterHandler = (url, apiConfig, store, hashHistory, excludeRemotePath) =>
remoteQueue.hasStoreMetrics = true
const now = performance.now()
if (now < getFirstHiddenTime().timeStamp) {
storeMetrics(metricsName.ACT, { value: now, remoteApis: remoteQueue.queue }, store)
storeMetrics(metricsName.ACT, { time: now, remoteApis: remoteQueue.queue }, store)
computeCCPAndRL(store)
}
}
Expand All @@ -106,7 +106,7 @@ const afterHandler = (url, apiConfig, store, hashHistory, excludeRemotePath) =>
remoteQueue.hasStoreMetrics = true
const now = performance.now()
if (now < getFirstHiddenTime().timeStamp) {
storeMetrics(metricsName.ACT, { value: now, remoteApis: remoteQueue.queue }, store)
storeMetrics(metricsName.ACT, { time: now, remoteApis: remoteQueue.queue }, store)
computeCCPAndRL(store)
}
}
Expand Down Expand Up @@ -186,7 +186,7 @@ export const initCCP = (
if (isEqualArr(remoteQueue.queue, completeQueue) && !remoteQueue.hasStoreMetrics) {
console.log('api list = ', remoteQueue.queue)
remoteQueue.hasStoreMetrics = true
storeMetrics(metricsName.ACT, { value: performance.now(), remoteApis: remoteQueue.queue }, store)
storeMetrics(metricsName.ACT, { time: performance.now(), remoteApis: remoteQueue.queue }, store)
}
computeCCPAndRL(store)
}
Expand Down

0 comments on commit e95cd69

Please sign in to comment.