KilnVM Live Labs /lab/hyperfine-cli-benchmark-lab
Step 1 of 3 Docs Build Your Own

Statistical CLI Benchmarking and Exports with hyperfine

Compare shell command latency across warmup runs offline with sharkdp hyperfine and export JSON and Markdown benchmark reports.

Step 1 of 3

Benchmark grep vs awk and export bench.json

Compare grep -c ERROR events.txt against awk '/ERROR/{c++} END{print c+0}' events.txt with hyperfine, writing results to bench.json:

bash
hyperfine --warmup 1 --runs 5 --export-json bench.json "grep -c ERROR events.txt" "awk '/ERROR/{c++} END{print c+0}' events.txt"

Click Check Step to continue.