LinuxCommandLibrary

cmdperf

Interactive command-line benchmarking tool

TLDR

Benchmark a single command with default 10 runs
$ cmdperf "sleep 0.1"
copy
Compare two commands side-by-side
$ cmdperf "grep 'ERROR' log.txt" "rg 'ERROR' log.txt"
copy
Run 100 iterations of a command
$ cmdperf -n 100 "ls -la"
copy
Simulate 10 concurrent requests
$ cmdperf -c 10 "curl -s https://example.com > /dev/null"
copy
Run for a fixed duration of 30 seconds
$ cmdperf -d 30s "redis-cli PING"
copy
Export results to a markdown file
$ cmdperf --markdown [results.md] "sleep 0.1" "sleep 0.2"
copy

SYNOPSIS

cmdperf [options] command [command...]

DESCRIPTION

cmdperf runs one or more shell commands repeatedly and gathers timing statistics, displaying them in a live terminal UI with a progress bar, ETA, and key metrics including mean execution time, standard deviation, and min/max ranges. It supports single command benchmarking, multi-command comparison, concurrent execution to simulate load, duration-based runs, and rate limiting for HTTP endpoint testing.

PARAMETERS

-n, --runs=N

Number of iterations to run (default: 10).
-c, --concurrency=N
Number of parallel executions (default: 1).
-d, --duration=DURATION
Run for a fixed duration instead of a fixed number of runs.
-r, --rate=RATE
Target request rate in requests per second.
-t, --timeout=DURATION
Per-command timeout (default: 1m).
-N, --no-shell
Execute command directly without wrapping in a shell.
--csv=FILE
Export results to CSV file.
--markdown=FILE
Export results to Markdown file.
--color-scheme=SCHEME
Set color scheme (default, catppuccin, tokyonight, nord, monokai, solarized, gruvbox, monochrome).

CAVEATS

Designed for quick interactive benchmarking, not a replacement for rigorous statistical profiling tools. Default shell wrapping adds overhead; use -N/--no-shell for tighter measurements when shell features are not needed.

HISTORY

cmdperf was created by Miklos Niedermayer and is written in Go under the MIT license. The latest release is v0.1.4 (January 2026). It fills a niche as a lightweight, interactive alternative to tools like hyperfine, with a focus on live TUI experience and concurrent execution simulation.

SEE ALSO

hyperfine(1), time(1), perf(1), bench(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard