Menu

Post image 1
Post image 2
1 / 2
0

Developers can't benchmark shell commands without Rust — so I built `bench-run`

DEV Community·Mu Micro·18 days ago
#MXiwdcis
Reading 0:00
15s threshold

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...…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More