Skip to content

Commit

Permalink
cli: bench: hyphenate command and bench names
Browse files Browse the repository at this point in the history
I don't think the names (without dashes) matter here.
  • Loading branch information
yuja committed Nov 4, 2024
1 parent 541376b commit ce601ef
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli/src/commands/bench/common_ancestors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn cmd_bench_common_ancestors(
let routine = || index.common_ancestors(&[commit1.id().clone()], &[commit2.id().clone()]);
run_bench(
ui,
&format!("commonancestors-{}-{}", args.revision1, args.revision2),
&format!("common-ancestors-{}-{}", args.revision1, args.revision2),
&args.criterion,
routine,
)?;
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/bench/is_ancestor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn cmd_bench_is_ancestor(
let routine = || index.is_ancestor(ancestor_commit.id(), descendant_commit.id());
run_bench(
ui,
&format!("isancestor-{}-{}", args.ancestor, args.descendant),
&format!("is-ancestor-{}-{}", args.ancestor, args.descendant),
&args.criterion,
routine,
)?;
Expand Down
4 changes: 0 additions & 4 deletions cli/src/commands/bench/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,9 @@ use crate::ui::Ui;
#[derive(Subcommand, Clone, Debug)]
#[command(hide = true)]
pub enum BenchCommand {
#[command(name = "commonancestors")]
CommonAncestors(BenchCommonAncestorsArgs),
#[command(name = "isancestor")]
IsAncestor(BenchIsAncestorArgs),
#[command(name = "resolveprefix")]
ResolvePrefix(BenchResolvePrefixArgs),
#[command(name = "revset")]
Revset(BenchRevsetArgs),
}

Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/bench/resolve_prefix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn cmd_bench_resolve_prefix(
let routine = || index.resolve_commit_id_prefix(&prefix);
run_bench(
ui,
&format!("resolveprefix-{}", prefix.hex()),
&format!("resolve-prefix-{}", prefix.hex()),
&args.criterion,
routine,
)?;
Expand Down

0 comments on commit ce601ef

Please sign in to comment.