The problem
Developers have no easy way to benchmark how long a shell command takes across multiple runs — time only runs once and hyperfine requires a Rust installation most Node developers don't have.
If you've hit this before, you know how it goes — you either run the command once with time , install hyperfine via brew or cargo, or just eyeball the timing.
As a solution, I created bench-run
Benchmark any shell command with min/max/avg/median timing over N runs
It's zero-dependency Node.js, so you can run it immediately without installing anything:
npx bench-run "npm test" --runs 5
Enter fullscreen mode
Exit fullscreen mode
Output:
bench-run: npm test Runs: 5
Run 1/5... 4.231s Run 2/5... 4.108s Run 3/5... 4.189s Run 4/5... 4.212s Run 5/5...…