Cargo Features
[dependencies]
criterion = { version = "0.8.2", default-features = false, features = ["stable", "real_blackbox", "rayon", "plotters", "async", "async_futures", "async_smol", "async_tokio", "html_reports", "cargo_bench_support", "csv_output"] }
- default = cargo_bench_support, plotters, rayon
-
These default features are set whenever
criterionis added withoutsomewhere in the dependency tree.default-features = false - stable = async_futures, async_smol, async_tokio, csv_output, html_reports
- real_blackbox
-
This is a legacy feature that no longer does anything, but removing it would be a semver break.
- rayon default
-
Enable rayon support
Enables rayon
Optional dependencies
- plotters default
-
Enable plotters support
Enables plotters
- async async_futures? async_smol? async_tokio?
-
Enable async/await support
Affects
bencher::AsyncBencher… - async_futures stable? = async
-
These features enable built-in support for running async benchmarks on each different async runtime.
Enables futures
Affects
async_executor::FuturesExecutor… - async_smol stable? = async
-
Enables smol
Affects
async_executor::SmolExecutor… - async_tokio stable? = async
-
Enables tokio
- html_reports stable?
-
Make Criterion.rs generate its own plots (as opposed to using cargo-criterion)
- cargo_bench_support default
-
Make Criterion.rs usable outside of cargo-criterion.
- csv_output stable?
-
Make Criterion.rs generate CSV files. This feature is deprecated in favor of cargo-criterion's --message-format=json option.
Enables csv