snippetbashTip
cargo bench — Compile and execute benchmarks. More information: <https://doc.rust-lang.org/cargo/commands/cargo-be
Viewed 0 times
commandbenchmarkscargo benchandcompileexecuteclimore
Problem
How to use the
cargo bench command: Compile and execute benchmarks. More information: <https://doc.rust-lang.org/cargo/commands/cargo-bench.html>.Solution
cargo bench — Compile and execute benchmarks. More information: <https://doc.rust-lang.org/cargo/commands/cargo-bench.html>.Execute all benchmarks of a package:
cargo benchDon't stop when a benchmark fails:
cargo bench --no-fail-fastCompile, but don't run benchmarks:
cargo bench --no-runBenchmark the specified benchmark:
cargo bench --bench {{benchmark}}Benchmark with the given profile (default:
bench):cargo bench --profile {{profile}}Benchmark all example targets:
cargo bench --examplesBenchmark all binary targets:
cargo bench --binsBenchmark the package's library:
cargo bench --libCode Snippets
Execute all benchmarks of a package
cargo benchDon't stop when a benchmark fails
cargo bench --no-fail-fastCompile, but don't run benchmarks
cargo bench --no-runBenchmark the specified benchmark
cargo bench --bench {{benchmark}}Benchmark with the given profile (default: `bench`)
cargo bench --profile {{profile}}Context
tldr-pages: common/cargo bench
Revisions (0)
No revisions yet.