Skip to content

Commit e43e319

Browse files
ci: add bench_tools CLI scaffold (#9612)
1 parent 79bfdb0 commit e43e319

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ members = [
8383
"crates/apollo_task_executor",
8484
"crates/apollo_test_utils",
8585
"crates/apollo_time",
86+
"crates/bench_tools",
8687
"crates/blockifier",
8788
"crates/blockifier_reexecution",
8889
"crates/blockifier_test_utils",
@@ -211,6 +212,7 @@ async-trait = "0.1.79"
211212
atomic_refcell = "0.1.13"
212213
axum = "0.6.12"
213214
base64 = "0.13.0"
215+
bench_tools.path = "crates/bench_tools"
214216
bincode = "1.3.3"
215217
bisection = "0.1.0"
216218
bitvec = "1.0.1"

crates/bench_tools/Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "bench_tools"
3+
edition.workspace = true
4+
version.workspace = true
5+
6+
[lints]
7+
workspace = true
8+
9+
[dependencies]
10+
clap = { workspace = true, features = ["derive"] }

crates/bench_tools/src/main.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
use clap::{Parser, Subcommand};
2+
3+
#[derive(Parser)]
4+
#[command(about = "Benchmark runner and comparison tool for CI.")]
5+
struct Cli {
6+
#[command(subcommand)]
7+
command: Commands,
8+
}
9+
10+
#[derive(Subcommand)]
11+
enum Commands {
12+
/// Run benchmarks and output results.
13+
Run {
14+
/// Package name to run benchmarks for.
15+
#[arg(short, long)]
16+
package: String,
17+
/// Output directory for results.
18+
#[arg(short, long)]
19+
out: String,
20+
},
21+
}
22+
23+
fn main() {
24+
let cli = Cli::parse();
25+
26+
match cli.command {
27+
Commands::Run { package: _, out: _ } => {
28+
unimplemented!()
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)