sharkdp/hyperfine
61.5
Adequate · 14 November 2026
6.7k
lines of production code
Rust
with Python
7
measurements over time
What this system is
Hyperfine is a command-line benchmarking tool that measures the performance of shell commands by collecting metrics such as wall-clock time, CPU usage, memory consumption, and hardware performance counters. It features a modular architecture that supports parameterized benchmarks, explicit shell execution modes, and multiple export formats including JSON, CSV, and documentation markup languages. The system also provides a suite of Python scripts for statistical analysis and visualization of benchmark results, ensuring consistent handling of performance data across different platforms.
How it got here
2018 — Hyperfine 2.0 modular rewrite
4 changes.
The project underwent a complete architectural rewrite of the Hyperfine benchmarking tool into a modular Rust application, introducing a comprehensive metrics system for CPU, memory, and hardware counters. This release, version 2.0, shifted to direct command execution by default and updated the JSON export schema to support these new measurements. Additionally, a suite of Python analysis and visualization scripts was added to enable detailed statistical evaluation and plotting of benchmark results.
2020–2021 — Export formats and hardware metrics
4 changes.
This period focused on expanding benchmark output capabilities by adding Asciidoc and Emacs org-mode export formats, alongside comprehensive documentation of execution order. It also introduced hardware performance counter support on Linux and macOS, integrating low-level metrics like CPU cycles and cache misses into the unified measurement API.
2022–2026 — Benchmarking infrastructure and type-safe metrics
4 changes.
This period focused on restructuring the benchmarking core with dedicated models for results and measurements, alongside a new type-safe quantity system for handling units and statistics. The output layer was modularized to improve progress reporting and benchmark visualization, while unified plotting utilities ensured consistent metric selection and validation across analysis scripts.
Features
Add man page and execution order diagram
The documentation now includes a generated man page (doc/hyperfine.1) covering all command-line options, including the new --setup, --conclude, and --shell flags, as well as an SVG diagram (doc/execution-order.svg) illustrating the sequence in which setup, warmup, prepare, benchmark, conclude, and cleanup commands are executed.
doc · high confidence
Hyperfine benchmarking tool rewritten with modular architecture and expanded metrics
The tool has been completely rewritten from a single-file prototype into a modular Rust application, introducing a structured CLI via clap, a new scheduler, and a comprehensive metrics system. Users can now measure additional performance indicators beyond wall-clock time, including CPU time, user/system time, peak memory usage, and hardware counters (cycles, instructions, cache/branch misses). The rewrite also adds support for parameterized benchmarks (lists and scans), environment variable overrides, and multiple export formats (CSV, JSON, Markdown, Emacs org-mode, AsciiDoc). Shell execution is now explicit, requiring users to choose between a default shell or raw execution, and the tool provides migration guidance for removed options like --reference.
src · high confidence
Introduces structured benchmark result and measurement models
The benchmark module now uses dedicated structs to represent benchmark outcomes and individual run data. BenchmarkResult holds the command line, optional custom name, display name, parameter values, environment overrides, and the collected measurements. Measurement captures per-run metrics including wall-clock time, user and system CPU time, peak resident memory, hardware counters (cycles, instructions, cache references/misses, branch misses), and exit status. Measurements aggregates these into a collection with helper methods for computing means and detecting outliers. The Scheduler orchestrates benchmark execution using these models, and the Executor trait defines how commands are run and measured, supporting raw, shell, and mock execution modes. Utility functions handle exit code extraction across platforms and provide randomized environment offsets to mitigate measurement bias.
src/benchmark · high confidence
New analysis and visualization scripts for benchmark exports
Users can now run a suite of Python scripts directly from GitHub using \uvx\ to analyze and visualize \hyperfine\ JSON benchmark exports. The new tools include \plot\_whisker\ for box-and-whisker plots, \plot\_histogram\ for distribution histograms, \plot\_parametrized\ for parameter-scan error bars, \plot\_progression\ for sequential run trends, and \plot\_benchmark\_comparison\ for comparing multiple export files. Additionally, \advanced\_statistics\ prints detailed statistical summaries and percentiles, while \welch\_ttest\ performs statistical significance testing between two benchmarks. All scripts support selecting specific metrics via the \--metric\ flag and are designed to run with Python 3.10+.
scripts · high confidence
New export formats: Asciidoc and Emacs org-mode tables
Users can now export benchmark results in Asciidoc and Emacs org-mode table formats in addition to the existing CSV, JSON, and Markdown options. The new exporters are registered via the \--export-asciidoc\ and \--export-orgmode\ CLI flags, and they render benchmark comparisons (command, mean time, change, and factor) using the appropriate markup syntax for their respective formats.
src/export · high confidence
New quantity and statistics modules for type-safe metrics
Added a new \quantity\ module that wraps the \uom\ library to provide type-safe units for time (e.g., seconds, milliseconds) and information (e.g., bytes, kibibytes), including custom serialization for these types. Introduced a \statistics\ submodule containing generic functions for computing min, max, mean, median, and standard deviation on these quantity types, along with modified Z-score calculations for outlier detection.
src/quantity · high confidence
Support for hardware performance counters and unified measurement API
The timer module now collects hardware performance metrics (CPU cycles, instructions, cache references, cache misses, and branch misses) on Linux and macOS in addition to wall-clock time, CPU time, and memory usage. This is implemented via new platform-specific modules (linux\_counters.rs and macos\_counters.rs) that interface with OS-level APIs (perf\_event\_open on Linux, proc\_pid\_rusage on macOS) and integrated into the unified execute\_and\_measure entry point. The module structure has been reorganized into a flat layout with separate files for wall-clock, CPU, and hardware counter logic across Unix and Windows platforms.
src/timer · high confidence
Unified metric selection for benchmark plotting scripts
A new shared utility module (scripts/plot\_utils.py) standardizes how benchmark metrics are selected, validated, and displayed across analysis and plotting tools. Users can now explicitly choose from a consistent set of metrics—including wall-clock time, CPU time, memory usage, and hardware performance counters (cycles, instructions, cache/branch stats)—via a --metric argument, with automatic fallback to the JSON export's primary metric when unspecified. This ensures consistent unit handling (seconds for time, MiB for memory, raw counts for hardware counters) and validates that the requested metric is available in the input data before plotting.
hyperfine-scripts · high confidence
Behavioural changes
Hyperfine 2.0: New metrics, direct execution, and schema v2 JSON export
Hyperfine 2.0 introduces support for alternative performance metrics (peak memory, instructions, CPU cycles, cache misses) via the new \--metrics\ option, with wall-clock time and peak memory displayed by default. Benchmark commands now execute directly without an intermediate shell by default (\--shell=none\), improving accuracy for fast commands, while setup/prepare/conclude/cleanup commands always run in a shell. The JSON export format has changed to schema version 2, including metadata, per-run measurements for all metrics, and statistical summaries, requiring updates to any code parsing exported JSON files. Additionally, \--time-unit\ and \--sort\ have been removed, and the first command is always treated as the reference for comparisons.
(repo-wide) · high confidence
New modular output system with improved progress bars and benchmark reports
The output module has been restructured into dedicated components (progress\_bar, report, warnings) to enhance the terminal user experience. Progress bars now display elapsed time during the initial benchmark run and adapt their layout for narrow terminals. Benchmark reports are formatted with aligned columns for metrics, standard deviations, and comparison factors, using color coding to highlight performance changes. Additionally, warning messages for initial run outliers have been expanded with specific, actionable hints based on whether the user has configured warmup or prepare options.
src/output · high confidence
Test coverage
Added integration tests for benchmark execution order and JSON export schema
Added new integration tests in the \tests\ directory to verify benchmark execution ordering (including setup, prepare, and conclude commands) and to snapshot the JSON export output, ensuring the schema version is 2 and metrics like \memory\_peak\_resident\ are correctly included.
tests · high confidence
Dependencies
Major dependency upgrades and new Python analysis scripts
The Rust core has been upgraded to version 2.0.0, introducing significant dependency updates including clap 4, serde 1.0, and libc 0.2, alongside a new minimum supported Rust version (MSRV) of 1.97.0. Additionally, a new Python package named hyperfine-scripts has been added, providing command-line tools for plotting and analyzing hyperfine JSON benchmark results using matplotlib, numpy, scipy, and pyqt6.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 62 → 61 (-0.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 95 → 92 (-3.1)
- Architecture 100 → 100 (+0.0)
- Maturity 55 → 55 (-0.6)
- Readiness 53 → 58 (+4.4)
- Security 76 → 65 (-11.1)
- Performance 80 → 80 (+0.0)
Resolved (2)
- No ADRs found
- Off-boarding risk: anonymized user #1
New (18)
- Low coverage: src/benchmark/executor.rs (src/benchmark/executor.rs)
- Low coverage: src/error.rs (src/error.rs)
- Low coverage: src/export/json.rs (src/export/json.rs)
- Low coverage: src/export/json/metadata.rs (src/export/json/metadata.rs)
- Low coverage: src/export/mod.rs (src/export/mod.rs)
- Low coverage: src/main.rs (src/main.rs)
- Low coverage: src/options.rs (src/options.rs)
- Low coverage: src/output/progress_bar.rs (src/output/progress_bar.rs)
- Low coverage: src/output/report.rs (src/output/report.rs)
- Low coverage: src/output/warnings.rs (src/output/warnings.rs)
- Low coverage: src/timer/linux_counters.rs (src/timer/linux_counters.rs)
- Low coverage: src/timer/mod.rs (src/timer/mod.rs)
- Low coverage: src/timer/unix_timer.rs (src/timer/unix_timer.rs)
- Low coverage: src/timer/wall_clock_timer.rs (src/timer/wall_clock_timer.rs)
- Low coverage: src/util/randomized_environment_offset.rs (src/util/randomized_environment_offset.rs)
- Medium advisory (unsound): RUSTSEC-2026-0486 (Cargo.lock)
- No ADRs found (pyproject.toml)
- Off-boarding risk: anonymized user #1
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
sharkdp/hyperfine was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit c5161524980522320c7d3425e714cc0965a869a5 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.