hyperfine-benchmarking
Original:🇺🇸 English
Translated
Use this skill to benchmark shell commands reliably with warmup runs, statistical summaries, and exportable artifacts using hyperfine.
14installs
Sourceakillness/oh-my-skills
Added on
NPX Install
npx skill4agent add akillness/oh-my-skills hyperfine-benchmarkingTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →hyperfine-benchmarking
Benchmark CLI commands with reproducible methodology instead of one-off output.
timeWhen to use this skill
- Compare two or more command variants (vs
tool-a)tool-b - Validate performance impact before/after script changes
- Attach benchmark evidence to PRs
Instructions
- Confirm tool availability.
- Keep input/workdir/environment stable across compared commands.
- Run warmups and enough runs for stable variance.
- Export JSON/markdown outputs for review.
- Summarize relative speedup + risk notes.
Examples
Availability check
bash
hyperfine --versionTwo-command comparison
bash
hyperfine \
--warmup 3 \
--min-runs 10 \
'cmd_a --with flags' \
'cmd_b --with flags'Parameter sweep
bash
hyperfine \
--warmup 3 \
--parameter-list mode fast,balanced,thorough \
'mytool --mode {mode} input.txt'Export artifacts
bash
hyperfine \
--warmup 3 \
--min-runs 10 \
--export-json benchmark.json \
--export-markdown benchmark.md \
'cmd_a' 'cmd_b'Best practices
- Prefer relative speedup and confidence ranges over single-run claims.
- Do not compare commands with different semantics unless outputs are normalized.
- If variance is high, increase runs or reduce background noise before concluding.
- Record dataset/path and exact command strings in PR text.
References
- hyperfine project: https://github.com/sharkdp/hyperfine
- Docs: https://github.com/sharkdp/hyperfine#readme