Criterion.rs is a statistics-driven benchmarking library for Rust that automates the collection and analysis of microbenchmark measurements.
The library solves the problem of unreliable benchmark results by applying statistical methods to distinguish genuine performance differences from noise. It collects multiple samples from each benchmark run, performs statistical analysis to detect outliers and compute confidence intervals, and generates detailed reports showing how performance changes across runs. This approach eliminates the guesswork from interpreting benchmark data and makes it easier to catch real regressions.
Criterion.rs suits projects where performance matters and developers need confidence that optimizations actually work. It integrates into Rust's built-in test framework, making it straightforward to add to existing codebases. The library generates both textual summaries and graphical plots to visualize performance trends, which helps when communicating results to teammates or tracking changes over time. Teams working on performance-critical systems, libraries, or applications where even small regressions matter will find the statistical rigor particularly valuable compared to running benchmarks once and eyeballing the numbers.
Development of the tool has transitioned to a dedicated organization to ensure continuity and active maintenance. The project maintains a backlog of pending contributions and is working through accumulated pull requests to bring the codebase current.