hyperfine

Benchmark and compare command execution times with statistical analysis.

brewmacoslinux
Try with needOr install directly
Source

About

Command-line benchmarking tool

Commands

hyperfine

Examples

measure how long a command takes to run$ hyperfine 'sleep 1'
compare speed of two different commands$ hyperfine 'cat file.txt' 'less file.txt'
benchmark with multiple runs for accuracy$ hyperfine --runs 100 'npm build'
test performance difference between two programs$ hyperfine 'grep pattern file.txt' 'rg pattern file.txt'
warm up cache before benchmarking$ hyperfine --warmup 3 'python script.py'