Skip to content

Commit e6d0f01

Browse files
committed
fix: cargo.toml foramtting
1 parent 1a2cc5f commit e6d0f01

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

benchmarks/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ mimalloc_extended = ["libmimalloc-sys/extended"]
4040

4141
[dependencies]
4242
arrow = { workspace = true }
43+
clap = { version = "4.5.53", features = ["derive"] }
4344
datafusion = { workspace = true, default-features = true }
4445
datafusion-common = { workspace = true, default-features = true }
4546
env_logger = { workspace = true }
@@ -54,7 +55,6 @@ regex.workspace = true
5455
serde = { version = "1.0.228", features = ["derive"] }
5556
serde_json = { workspace = true }
5657
snmalloc-rs = { version = "0.3", optional = true }
57-
clap = { version = "4.5.53", features = ["derive"] }
5858
tokio = { workspace = true, features = ["rt-multi-thread", "parking_lot"] }
5959
tokio-util = { version = "0.7.17" }
6060

benchmarks/src/bin/imdb.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,30 @@ static ALLOC: snmalloc_rs::SnMalloc = snmalloc_rs::SnMalloc;
3434
#[global_allocator]
3535
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
3636

37-
#[derive(Debug, Subcommand)]
38-
enum BenchmarkSubCommandOpt {
39-
#[command(name = "datafusion")]
40-
DataFusionBenchmark(imdb::RunOpt),
41-
}
42-
4337
#[derive(Debug, Parser)]
4438
#[command(name = "IMDB", about = "IMDB Dataset Processing.")]
39+
struct Cli {
40+
#[command(subcommand)]
41+
command: ImdbOpt,
42+
}
43+
44+
#[derive(Debug, Subcommand)]
4545
enum ImdbOpt {
4646
#[command(subcommand)]
4747
Benchmark(BenchmarkSubCommandOpt),
4848
Convert(imdb::ConvertOpt),
4949
}
5050

51+
#[derive(Debug, Subcommand)]
52+
enum BenchmarkSubCommandOpt {
53+
#[command(name = "datafusion")]
54+
DataFusionBenchmark(imdb::RunOpt),
55+
}
56+
5157
#[tokio::main]
5258
pub async fn main() -> Result<()> {
5359
env_logger::init();
54-
match ImdbOpt::parse() {
60+
match Cli::parse().command {
5561
ImdbOpt::Benchmark(BenchmarkSubCommandOpt::DataFusionBenchmark(opt)) => {
5662
Box::pin(opt.run()).await
5763
}

benchmarks/src/bin/mem_profile.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use datafusion_benchmarks::{
3333

3434
#[derive(Debug, Parser)]
3535
#[command(name = "Memory Profiling Utility")]
36-
struct MemProfileOpt {
36+
struct Cli {
3737
/// Cargo profile to use in dfbench (e.g. release, release-nonlto)
3838
#[arg(long, default_value = "release")]
3939
bench_profile: String,
@@ -55,9 +55,9 @@ enum Options {
5555
#[tokio::main]
5656
pub async fn main() -> Result<()> {
5757
// 1. Parse args and check which benchmarks should be run
58-
let mem_profile_opt = MemProfileOpt::parse();
59-
let profile = mem_profile_opt.bench_profile;
60-
let query_range = match mem_profile_opt.command {
58+
let cli = Cli::parse();
59+
let profile = cli.bench_profile;
60+
let query_range = match cli.command {
6161
Options::Clickbench(opt) => {
6262
let entries = std::fs::read_dir(&opt.queries_path)?
6363
.filter_map(Result::ok)

0 commit comments

Comments
 (0)