diff --git a/lib/plugins/browsertime/aggregator.js b/lib/plugins/browsertime/aggregator.js index d33d774de..e858eb3b1 100644 --- a/lib/plugins/browsertime/aggregator.js +++ b/lib/plugins/browsertime/aggregator.js @@ -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) { diff --git a/lib/plugins/browsertime/index.js b/lib/plugins/browsertime/index.js index 7d833dd89..e809a5e79 100644 --- a/lib/plugins/browsertime/index.js +++ b/lib/plugins/browsertime/index.js @@ -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) {