Add CLI params to turn off LCP/LS screenshots. (#4201)

They already exists in Browsertime.

https://github.com/sitespeedio/sitespeed.io/issues/4189
This commit is contained in:
Peter Hedenskog 2024-06-25 07:53:48 +02:00 committed by GitHub
parent b37f342be1
commit 051ae36270
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 0 deletions

View File

@ -1466,6 +1466,22 @@ export async function parseCommandLine() {
})
/** Screenshot */
.option('browsertime.screenshotLCP', {
alias: 'screenshotLCP',
type: 'boolean',
default: false,
describe:
'Save one screenshot per iteration that shows the largest contentful paint element (if the browser supports LCP).',
group: 'Screenshot'
})
.option('browsertime.screenshotLS', {
alias: 'screenshotLS',
type: 'boolean',
default: false,
describe:
'Save one screenshot per iteration that shows the layout shift elements (if the browser supports layout shift).',
group: 'Screenshot'
})
.option('browsertime.screenshot', {
type: 'boolean',
describe: 'Set to false to disable screenshots',
@ -2042,6 +2058,8 @@ export async function parseCommandLine() {
.alias('help', 'h')
.config(config)
.hide('disableAPI')
.hide('browsertime.screenshotLCP')
.hide('browsertime.screenshotLS')
.alias('version', 'V')
.version(version)
.coerce('budget', function (argument) {