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