Skip to content

Commit a95079e

Browse files
committed
Use LocalOptions for bench_runtime_local
1 parent d6d292d commit a95079e

File tree

1 file changed

+6
-23
lines changed

1 file changed

+6
-23
lines changed

collector/src/bin/collector.rs

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -565,19 +565,8 @@ struct BenchRustcOption {
565565
enum Commands {
566566
/// Benchmarks the performance of programs generated by a local rustc
567567
BenchRuntimeLocal {
568-
/// The path to the local rustc to measure
569-
rustc: String,
570-
/// Identifier to associate benchmark results with
571-
#[clap(long)]
572-
id: Option<String>,
573-
574-
/// Exclude all benchmarks matching a prefix in this comma-separated list
575-
#[clap(long)]
576-
exclude: Option<String>,
577-
578-
/// Include only benchmarks matching a prefix in this comma-separated list
579-
#[clap(long)]
580-
include: Option<String>,
568+
#[clap(flatten)]
569+
local: LocalOptions,
581570

582571
/// How many iterations of each benchmark should be executed.
583572
#[clap(long, default_value = "5")]
@@ -714,17 +703,11 @@ fn main_result() -> anyhow::Result<i32> {
714703
let target_triple = format!("{}-unknown-linux-gnu", std::env::consts::ARCH);
715704

716705
match args.command {
717-
Commands::BenchRuntimeLocal {
718-
rustc,
719-
id,
720-
exclude,
721-
include,
722-
iterations,
723-
} => {
706+
Commands::BenchRuntimeLocal { local, iterations } => {
724707
bench_runtime(
725-
&rustc,
726-
id.as_deref(),
727-
BenchmarkFilter::new(exclude, include),
708+
&local.rustc,
709+
local.id.as_deref(),
710+
BenchmarkFilter::new(local.exclude, local.include),
728711
runtime_benchmark_dir,
729712
iterations,
730713
)?;

0 commit comments

Comments
 (0)