Skip to content

Commit

Permalink
Make sure you can't run with both --cpu and --collectProfileRun (#4298)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Dec 27, 2024
1 parent bbcb541 commit 1da2af5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ function validateInput(argv) {
return 'Error: Getting CrUx data do not work running in multi mode.';
}

if (argv.browsertime.cpu && argv.browsertime.enableProfileRun) {
return 'Error: Use either --cpu or --enableProfileRun. Profile run will run one extra iteration to collect cpu/trace data.';
}

if (
argv.urlAlias &&
argv._ &&
Expand Down Expand Up @@ -573,13 +577,13 @@ export async function parseCommandLine() {
alias: 'enableProfileRun',
type: 'boolean',
describe:
'Make one extra run that collects the profiling trace log (no other metrics is collected). For Chrome it will collect the timeline trace, for Firefox it will get the Geckoprofiler trace. This means you do not need to get the trace for all runs and can skip the overhead it produces.'
'Make one extra run that collects the profiling trace log (no other metrics is collected). For Chrome it will collect the timeline trace, for Firefox it will get the Geckoprofiler trace. This means you do not need to get the trace for all runs and can skip the overhead it produces. You should not run this together with --cpu since that will get a trace for every iteration.'
})
.option('browsertime.enableVideoRun', {
alias: 'enableVideoRun',
type: 'boolean',
describe:
'Make one extra run that collects video and visual metrics. This means you can do your runs with --visualMetrics true --video false --enableVideoRun true to collect visual metrics from all runs and save a video from the profile/video run. If you run it together with --enableProfileRun it will also collect profiling trace.'
'Make one extra run that collects video and visual metrics. This means you can do your runs with --visualMetrics true --video false --enableVideoRun true to collect visual metrics from all runs and save a video from the profile/video run. If you run it together with --enableProfileRun it will also collect profiling race.'
})
.option('browsertime.videoParams.filmstripFullSize', {
alias: 'videoParams.filmstripFullSize',
Expand Down

0 comments on commit 1da2af5

Please sign in to comment.