ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: allow to run "jj bench revset" for more than one revsets

This commit is contained in:
Yuya Nishihara 2023-03-31 18:56:30 +09:00
parent a27fb79e96
commit 6c6fdae88d

View file

@ -62,7 +62,8 @@ pub struct BenchIsAncestorArgs {
/// Walk the revisions in the revset
#[derive(clap::Args, Clone, Debug)]
pub struct BenchRevsetArgs {
revisions: String,
#[arg(required = true)]
revisions: Vec<String>,
#[command(flatten)]
criterion: CriterionArgs,
}
@ -186,13 +187,9 @@ pub(crate) fn cmd_bench(
let workspace_command = command.workspace_helper(ui)?;
let mut criterion = new_criterion(ui, &command_matches.criterion);
let mut group = criterion.benchmark_group("revsets");
bench_revset(
ui,
command,
&workspace_command,
&mut group,
&command_matches.revisions,
)?;
for revset in &command_matches.revisions {
bench_revset(ui, command, &workspace_command, &mut group, revset)?;
}
// Neither of these seem to report anything...
group.finish();
criterion.final_summary();