Criterion.rs is a feature-rich Rust benchmarking crate and an option for running benchmarks on stable Rust. It is a Rust port of Haskell’s Criterion library. section 10.4
Criterion.rs
Criterion.rs is a Rust benchmarking library that provides statistically oriented and feature-rich performance measurement.
How Idiomatic Rust covers it
- How deep it goes
- Identifies a feature-rich benchmarking tool and Haskell port, but does not detail its API or statistical methods.
- What you can do after
- Apply it to run benchmarks on stable Rust.
- How it connects
- Connects it to `cargo bench` and the Rust test library’s `Bencher` workflow as an alternative.
Also explained in
-
Refactoring to RustCriterion is a Rust benchmarking library that performs statistically driven performance measurements.
-
LatencyCriterion is a Rust benchmarking library for statistically evaluating the performance of code.
Compare how 3 books explain Criterion.rs →
Related concepts
- cratekind of · A crate is Rust’s unit of compilation and distribution, containing source code and metadata for a library or executable.
- benchmarkuses · A benchmark is a defined task, dataset, workload, procedure, or reference measure used to assess or compare performance or capability under specified criteria or conditions.
- PyO3uses · PyO3 is a Rust library providing bindings for integrating Rust code with Python and the Python C API.
- performance testingused by · Performance testing is the evaluation of a system's behavior, such as its responsiveness, throughput, scalability, stability, or resource use, under specified workloads and operating conditions.
This explainer was generated by Manning's knowledge graph from the text of Idiomatic Rust. The section links point to the parts of the book it draws on.


