Add Google Web Vitals per run (#3437)
This commit is contained in:
parent
a5d5ca67ec
commit
13216a1de6
|
|
@ -33,12 +33,14 @@ module.exports = {
|
|||
}
|
||||
|
||||
if (browsertimeRunData.googleWebVitals) {
|
||||
statsHelpers.pushGroupStats(
|
||||
this.statsPerType,
|
||||
this.groups[group],
|
||||
['googleWebVitals'],
|
||||
browsertimeRunData.googleWebVitals
|
||||
);
|
||||
for (let metric of Object.keys(browsertimeRunData.googleWebVitals)) {
|
||||
statsHelpers.pushGroupStats(
|
||||
this.statsPerType,
|
||||
this.groups[group],
|
||||
['googleWebVitals', metric],
|
||||
browsertimeRunData.googleWebVitals[metric]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (browsertimeRunData.timings.largestContentfulPaint) {
|
||||
|
|
|
|||
|
|
@ -206,6 +206,11 @@ module.exports = {
|
|||
run.visualMetrics = result[resultIndex].visualMetrics[runIndex];
|
||||
}
|
||||
|
||||
if (result[resultIndex].googleWebVitals) {
|
||||
run.googleWebVitals =
|
||||
result[resultIndex].googleWebVitals[runIndex];
|
||||
}
|
||||
|
||||
let harIndex = runIndex * result.length;
|
||||
harIndex += resultIndex;
|
||||
if (result.har) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue