| name | hyperfine |
| description | Use this skill when the user wants to benchmark command execution times, compare performance of different commands, measure script performance, or analyze CLI tool speed. |
hyperfine Plugin
Command-line benchmarking tool to measure and compare command execution times with statistical analysis.
Commands
Benchmark
hyperfine benchmark run — Benchmark a single command
hyperfine benchmark compare — Compare multiple commands
Usage Examples
- "Benchmark this command"
- "Compare the speed of these two commands"
- "Measure execution time of this script"
- "Which command is faster: A or B?"
Installation
cargo install hyperfine
brew install hyperfine
apt install hyperfine
Examples
hyperfine "sleep 0.5"
hyperfine "sleep 0.5" "sleep 1"
hyperfine --warmup 3 "sleep 0.5"
hyperfine --runs 10 "sleep 0.5"
hyperfine --export-json results.json "sleep 0.5"
hyperfine --prepare 'make build' './program arg1'
Common Flags
--warmup N — Number of warmup runs
--runs N — Number of benchmark runs
--min-runs N — Minimum number of runs
--export-json FILE — Export results as JSON
--export-markdown FILE — Export results as Markdown
--export-csv FILE — Export results as CSV
--prepare CMD — Command to run before each benchmark
--cleanup CMD — Command to run after each benchmark
-s — Shell to use
-n NAME — Name for the command