The Best Guess logo, a jar of colored marbles

BestGuess

Command-line benchmarking tool

Source code repository

News

  • 2024-12-06. BestGuess 0.7.5 released.

BestGuess

BestGuess is a tool for command-line benchmarking, sometimes called “macro-benchmarking” because entire programs are measured.

BestGuess does these things:

  1. Runs commands and captures run times, memory usage, and more data about their execution.
  2. Saves the raw data, for record-keeping or for later analysis.
  3. Optionally reports on various properties of the data distribution.
  4. Ranks the benchmarked commands from fastest to slowest.

It’s easy to use. For instance, run bestguess -r 100 'ps' 'ps A' to see how much slower ps runs when it needs to list all processes. The -r 100 specifies 100 timed executions.

Because performance distributions are rarely (if ever) regular, BestGuess uses non-parametric statistics to analyze the distribution of run times (total CPU time) for each command. You can see how far from normal your own measurements are by adding -D (for “Distribution analysis”). And -E (for “Explain”) adds an explanation of the rankings to the output.