Files
tldr/pages/common/cargo-bench.md
2023-10-29 09:54:53 +01:00

37 lines
659 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 bench`
- Don't stop when a benchmark fails:
`cargo bench --no-fail-fast`
- Compile, but dont run benchmarks:
`cargo bench --no-run`
- Benchmark the specified benchmark:
`cargo bench --bench {{benchmark}}`
- Benchmark with the given profile (default: `bench`):
`cargo bench --profile {{profile}}`
- Benchmark all example targets:
`cargo bench --examples`
- Benchmark all binary targets:
`cargo bench --bins`
- Benchmark the packages library:
`cargo bench --lib`