Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

hyperfine

$ hyperfine Community Med Risk
sharkdp (OSS) · Files & Search · MIT / Apache-2.0 · macos / linux / windows

hyperfine measures command execution latency with warmup runs, outlier detection, and statistical summaries. Agents use --export-json and --style basic to compare implementations objectively without flaky one-off time readings.

FCRS-1.0 Score
90 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install hyperfine
CLI vs MCP Decision CLI Preferred vs MCP

Benchmarking local scripts and binaries happens directly in the workspace shell via hyperfine.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Supports --export-json, --export-markdown, --style basic, and zero-prompt execution.

  • Structured --export-json metrics and --style basic non-ANSI mode
Trust & Safety 20 / 25

Executes arbitrary shell command arguments repeatedly; safe when benchmarking read-only commands, risky if pointed at mutating scripts.

  • Repeatedly runs supplied shell commands through sh -c unless -N is set
Setup & Portability 15 / 15

Single Rust binary on brew, cargo, apt, and Windows.

  • Cross-platform static binary
Utility & Efficiency 14 / 15

Replaces error-prone manual time loops with statistically sound warmup and comparison.

  • Automatic warmup, outlier detection, and relative speedup summary
Maintenance & Lineage 9 / 10

Maintained under sharkdp/hyperfine with widespread engineering adoption.

  • Active OSS repo under MIT / Apache-2.0
Docs & Verifiability 9 / 10

Clear README and --help covering --prepare, --cleanup, and export formats.

  • Detailed README and built-in --help

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; executes local benchmark commands only.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free, offline, and open-source (MIT / Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# hyperfine Agent Rules
- Cap iterations with `--runs` (e.g. `5` or `10`) on slow commands so benchmarks finish within shell timeouts.
- Only benchmark idempotent or side-effect-isolated commands; never benchmark destructive writes without `--prepare` / `--cleanup`.

Agent-Ready Command Recipes

Safe Read-Only Queries

Benchmark two read-only commands with bounded runs
hyperfine --warmup 2 --runs 5 --style basic 'rg -l TODO src/' 'grep -rl TODO src/'

Runs 2 warmups and 5 timed runs with plain terminal styling (--style basic).

Controlled Writes & Previews

Export structured benchmark statistics to JSON
hyperfine --warmup 2 --runs 5 --export-json /tmp/bench.json 'rg -l TODO src/'

Writes mean, median, stddev, and individual run timings to /tmp/bench.json.

Strengths for Agents

  • + Produces rigorous statistical comparisons and --export-json artifacts.
  • + Supports --style basic and -N (no shell) for clean, deterministic benchmarking.

Caveats & Pitfalls

  • ! Commands run multiple times by default—must bound with --runs and avoid unisolated side effects.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI