Overview of the pyperf toolkit
mainThe pyperf module is a toolkit designed for writing, running, and analyzing benchmarks in Python. It provides tools for reliable benchmarking, including automatic calibration for a time budget, support for multiple worker processes, and statistical analysis of results (mean, standard deviation, percentiles, etc.).
Key capabilities include:
- Reliable Execution: Automatic calibration and system tuning to ensure stable results.
- Statistical Analysis: Commands like
pyperf statsfor distribution analysis andpyperf compare_tofor significance testing. - Microbenchmarking: The
pyperf timeitCLI tool for quick Python microbenchmarks. - Resource Tracking: Options to track memory usage via
--track-memoryand--tracemalloc. - Metadata Collection: Automatic collection of system and benchmark metadata.
- Data Formats: Support for JSON storage and multiple units (seconds, bytes, and integers).