Update to latest BT alpha (#3323)

This commit is contained in:
Peter Hedenskog 2021-03-26 10:34:41 +01:00 committed by GitHub
parent b4696c7b6d
commit 297d4e12f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 30 additions and 29 deletions

View File

@ -32,12 +32,12 @@ module.exports = {
);
}
if (browsertimeRunData.pageinfo.layoutShift) {
if (browsertimeRunData.pageinfo.cumulativeLayoutShift) {
statsHelpers.pushGroupStats(
this.statsPerType,
this.groups[group],
['pageinfo', 'layoutShift'],
browsertimeRunData.pageinfo.layoutShift
['pageinfo', 'cumulativeLayoutShift'],
browsertimeRunData.pageinfo.cumulativeLayoutShift
);
}

View File

@ -8,6 +8,7 @@ module.exports = [
'statistics.timings.timeToContentfulPaint',
'statistics.timings.timeToFirstInteractive',
'statistics.timings.loadEventEnd',
'statistics.timings.ttfb',
'statistics.timings.userTimings',
'statistics.timings.paintTiming',
'statistics.timings.largestContentfulPaint.renderTime',
@ -29,7 +30,7 @@ module.exports = [
'statistics.cdp.performance.FirstMeaningfulPaint',
'statistics.errors',
'statistics.axe.violations.*',
'statistics.pageinfo.layoutShift',
'statistics.pageinfo.cumulativeLayoutShift',
'statistics.pageinfo.domElements',
'statistics.extras.*',
'statistics.android.batteryTemperature.*',

View File

@ -29,7 +29,7 @@ module.exports = {
'timings.PerceptualSpeedIndex',
'timings.VisualReadiness',
'timings.VisualComplete',
'pageinfo.layoutShift',
'pageinfo.cumulativeLayoutShift',
'requests.total',
'requests.javascript',
'requests.css',

View File

@ -167,10 +167,10 @@ module.exports = function(data) {
}
}
if (summary.pageinfo && summary.pageinfo.layoutShift) {
if (summary.pageinfo && summary.pageinfo.cumulativeLayoutShift) {
rows.push(
row(
summary.pageinfo.layoutShift,
summary.pageinfo.cumulativeLayoutShift,
'Cumulative Layout Shift',
'cumulativeLayoutShift'
)

View File

@ -37,7 +37,7 @@ module.exports = {
VisualComplete: {}
},
pageinfo: {
layoutShift: {}
cumulativeLayoutShift: {}
},
requests: {
total: { green: 80, yellow: 200 },

View File

@ -94,7 +94,7 @@ block content
tr
td LCP
td #{h.time.ms(lcp)}
- cls = get(d, 'browsertime.run.pageinfo.layoutShift')
- cls = get(d, 'browsertime.run.pageinfo.cumulativeLayoutShift')
if cls || cls === 0
tr
td CLS

View File

@ -13,8 +13,8 @@ if browsertime
if timings.largestContentfulPaint
a(href='#largestContentfulPaint') Largest Contentful Paint
|  | 
if browsertime.pageinfo && browsertime.pageinfo.layoutShift !== undefined
a(href='#layoutShift') Cumulative Layout Shift
if browsertime.pageinfo && browsertime.pageinfo.cumulativeLayoutShift !== undefined
a(href='#cumulativeLayoutShift') Cumulative Layout Shift
|  | 
if browsertime.timings.elementTimings && Object.keys(browsertime.timings.elementTimings).length > 0
a(href='#elementTimings') Element Timings
@ -139,8 +139,8 @@ if browsertime
td.number #{h.time.ms(Math.max(timings.largestContentfulPaint.loadTime,timings.largestContentfulPaint.renderTime, timings.largestContentfulPaint.loadTime,timings.largestContentfulPaint.loadTime))}
tr
td
a(href=baseHelpURL + 'layoutShift') Cumulative Layout Shift (CLS)
td.number #{browsertime.pageinfo.layoutShift.toFixed(2)}
a(href=baseHelpURL + 'cumulativeLayoutShift') Cumulative Layout Shift (CLS)
td.number #{browsertime.pageinfo.cumulativeLayoutShift.toFixed(2)}
if browsertime.timings.firstInput !== undefined
tr
td

View File

@ -1,9 +1,9 @@
if browsertime.pageinfo && browsertime.pageinfo.layoutShift !== undefined
a#layoutShift
if browsertime.pageinfo && browsertime.pageinfo.cumulativeLayoutShift!== undefined
a#cumulativeLayoutShift
h3 Detected Cumulative Layout Shift
if (browsertime.pageinfo.layoutShift === 0)
if (browsertime.pageinfo.cumulativeLayoutShift === 0)
p No layout shift detected.
else
p #{browsertime.pageinfo.layoutShift.toFixed(2)} layout shift collected from the
p #{browsertime.pageinfo.cumulativeLayoutShift.toFixed(2)} layout shift collected from the
a(href='https://web.dev/cls/') Cumulative Layout Shift API
| .

View File

@ -118,7 +118,7 @@ block content
tr
td Largest Contentful Paint (LCP) [median]
td #{h.time.ms(lcp)}
- cls = get(d, 'browsertime.pageSummary.statistics.pageinfo.layoutShift.median')
- cls = get(d, 'browsertime.pageSummary.statistics.pageinfo.cumulativeLayoutShift.median')
if cls || cls === 0
tr
td Cumulative Layout Shift (CLS) [median]

View File

@ -73,7 +73,7 @@ if btStatistics
each timing in timingMetrics
+getRow(timing, pageInfo, 'data.browsertime.pageSummary.statistics.timings.' + timing , pageInfo.data.browsertime.pageSummary.browserScripts, 'timings.' + timing, h.time.ms)
+getRow('CLS', pageInfo, 'data.browsertime.pageSummary.statistics.pageinfo.layoutShift' , pageInfo.data.browsertime.pageSummary.browserScripts, 'pageinfo.layoutShift', h.noop)
+getRow('CLS', pageInfo, 'data.browsertime.pageSummary.statistics.pageinfo.cumulativeLayoutShift' , pageInfo.data.browsertime.pageSummary.browserScripts, 'pageinfo.cumulativeLayoutShift', h.noop)
if btStatistics.timings && btStatistics.timings.userTimings && btStatistics.timings.userTimings.marks
tr

View File

@ -134,9 +134,9 @@ module.exports = {
}
},
pageinfo: {
layoutShift: {
path: 'statistics.pageinfo.layoutShift.median',
summaryPath: 'pageinfo.layoutShift',
cumulativeLayoutShift: {
path: 'statistics.pageinfo.cumulativeLayoutShift.median',
summaryPath: 'pageinfo.cumulativeLayoutShift',
name: 'Cumulative Layout Shift',
format: noop
}

12
npm-shrinkwrap.json generated
View File

@ -752,9 +752,9 @@
}
},
"@types/node": {
"version": "14.14.35",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz",
"integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag=="
"version": "14.14.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.36.tgz",
"integrity": "sha512-kjivUwDJfIjngzbhooRnOLhGYz6oRFi+L+EpMjxroDYXwDw9lHrJJ43E+dJ6KAd3V3WxWAJ/qZE9XKYHhjPOFQ=="
},
"abbrev": {
"version": "1.1.1",
@ -1099,9 +1099,9 @@
}
},
"browsertime": {
"version": "12.0.0-alpha.2",
"resolved": "https://registry.npmjs.org/browsertime/-/browsertime-12.0.0-alpha.2.tgz",
"integrity": "sha512-Hee8TAML1zAs6tu4dqPiu0Rt8YzzfEgWHK72cu4nhoXwZVu+Od2WQv/a5xrv4+6TXk3yEQB6Zzc0pLyIZXXMWQ==",
"version": "12.0.0-alpha.3",
"resolved": "https://registry.npmjs.org/browsertime/-/browsertime-12.0.0-alpha.3.tgz",
"integrity": "sha512-3L3ebU4lcWdswROZOEcY/x4nzY8Oqabwwg3UPkYspEp3/CHo3uj6Jj6C8NqOONPJEyCLUHWtRSB4b9Yc2/tZ+Q==",
"requires": {
"@cypress/xvfb": "1.2.4",
"@devicefarmer/adbkit": "2.11.3",

View File

@ -73,7 +73,7 @@
"@tgwf/co2": "0.6.1",
"aws-sdk": "2.784.0",
"axe-core": "4.1.3",
"browsertime": "12.0.0-alpha.2",
"browsertime": "12.0.0-alpha.3",
"coach-core": "6.1.0",
"cli-color": "2.0.0",
"concurrent-queue": "7.0.2",