From 6c6fdae88ddf091f54833002fe7b6683f015b7c7 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Fri, 31 Mar 2023 18:56:30 +0900 Subject: [PATCH] cli: allow to run "jj bench revset" for more than one revsets --- src/commands/bench.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/commands/bench.rs b/src/commands/bench.rs index 30d6cbeab..a68555540 100644 --- a/src/commands/bench.rs +++ b/src/commands/bench.rs @@ -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, #[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();