← Back to tools
View AGENTS.md for hyperfine
hyperfine
A command-line benchmarking tool with statistical analysis
Description
hyperfine is a benchmarking tool for command-line programs. It runs commands multiple times, performs statistical analysis, supports warmup runs, and can export results in various formats for comparison.
Install
homebrew
brew install hyperfinecargo
cargo install hyperfineapt
sudo apt install hyperfinepacman
sudo pacman -S hyperfineAI Summary
A command-line benchmarking tool with statistical analysis. Runs commands multiple times, performs warmup runs, detects outliers, and supports comparative benchmarking.
Capabilities
- + Statistical analysis with mean, stddev, min, max
- + Warmup runs and cache clearing between runs
- + Side-by-side comparison of multiple commands
- + Export results as JSON, CSV, or Markdown
Use When
- → Benchmarking CLI commands or scripts
- → Comparing performance of alternative tools or approaches
- → Need statistically rigorous timing measurements
Avoid When
- x Profiling code internals (use a language-specific profiler)
- x One-off timing where shell 'time' suffices
Usage Patterns
Benchmark a single command
hyperfine 'fd -e py' Runs the command multiple times and shows statistical summary
Compare two commands
hyperfine 'find . -name "*.py"' 'fd -e py' Benchmarks both commands and shows relative performance
Input / Output
stdout: Statistical summary with timing results
Exit codes:
0 Success 1 Error