Include FCP and LCP in the filmstrip (#2996)

This commit is contained in:
Peter Hedenskog 2020-05-15 12:09:07 +02:00 committed by GitHub
parent e018a2e326
commit 8c86c8dd46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -68,6 +68,28 @@ function getMetricsFromBrowsertime(data) {
});
}
if (
data.timings.paintTiming &&
data.timings.paintTiming['first-contentful-paint']
) {
metrics.push({
metric: 'first-contentful-paint',
name: 'FCP',
value: data.timings.paintTiming['first-contentful-paint']
});
}
if (
data.timings.largestContentfulPaint &&
data.timings.largestContentfulPaint.renderTime
) {
metrics.push({
metric: 'largestContentfulPaint',
name: 'LCP',
value: data.timings.largestContentfulPaint.renderTime
});
}
if (data.visualMetrics) {
metrics.push({
metric: 'FirstVisualChange',