I tried to run cargo bench on my project but got this error message:
cargo bench
Finished bench [optimized] target(s) in 0.43s
Running benches/ycsb.rs (target/release/deps/ycsb-6cb198fcd0eac019)
Gnuplot not found, using plotters backend
Benchmarking ycsb: Warming up for 3.0000 serror: Found argument '--bench' which wasn't expected, or isn't valid in this context
USAGE:
ycsb-6cb198fcd0eac019 [OPTIONS] --workload <workload> [COMMANDS]...
For more information try --help
error: bench failed, to rerun pass `--bench ycsb`
Caused by:
process didn't exit successfully: `xxx/target/release/deps/ycsb-6cb198fcd0eac019 --bench` (exit status: 1)
The Cargo.toml is like:
[package]
name = "xxx"
version = "0.1.0"
edition = "2021"
[dependencies]
# ...
[dev-dependencies]
# ...
criterion = { version = "0.5.1", features = ["async_tokio"] }
[lints.rust]
unused = "allow"
unsafe_code = "forbid"
[[bench]]
name = "ycsb"
harness = false
[lib]
bench = false
and the benches reside in ${project}/benches/ycsb.rs:
I tried to run
cargo bench
on my project but got this error message:The
Cargo.toml
is like:and the benches reside in
${project}/benches/ycsb.rs
: