Essential System Utils

Essential System Tools: hyperfine – command-line benchmarking tool

Other Features

There’s a good array of options when it comes to exporting the timing summary statistics: They can be exported as:

  • Markdown table. This is useful for adding the information to README files.
  • Asciidoc table. Asciidoc is a human-readable document format, semantically equivalent to DocBook XML. Functionally similar to the Markdown exporter.
  • CSV. A comma-separated values file is a delimited text file that uses a comma to separate values. This format is good for simple plotting (with say gnuplot).
  • JSON. JavaScript Object Notation is an open-standard file format that uses human-readable text to transmit data objects consisting of attribute–value pairs and array data types.

Here’s sample output for JSON (wth –export-json flag).
"results": [
"command": "rg function",
"mean": 0.008575504717499998,
"stddev": 0.0025438385555524145,
"median": 0.00790677083,
"user": 0.009391101437499997,
"system": 0.0029515089687499993,
"min": 0.00537702633,
"max": 0.018378137330000002,
"times": [
lines omitted for brevity

What other features are on offer?

  • Statistical analysis across multiple runs.
  • Support for arbitrary shell commands.
  • Run hyperfine with the shell of your choice.
  • Statistical outlier detection to detect interference from other programs and caching effects.
  • Parameterized benchmarks (e.g. vary the number of threads). With this feature, you can run a benchmark where only a single parameter is altered.
  • Option to disable output coloring and interactive elements.
  • -c, --cleanup <CMD> option to execute CMD after the completion of all benchmarking runs for a given command. This is useful if the commands to be benchmarked produce artifacts that need to be cleaned up.
  • Set the time limit used. Choose from millisecond or second.

Next page: Page 4 – Summary

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Other Features
Page 4 – Summary

Share this article


Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.