Skip to content
Myr

README.md

This file

Path

scripts/README.md

33 lines · 1.2 KiB · Markdown

Last changed by

Make plotting scripts runnable with uvDavid Peterbefore adoptionce49529

History of this file

Take it

Show the source

README.md

This folder contains scripts that can be used in combination with hyperfine's --export-json option.

Run directly from GitHub

Install uv, then run one of the scripts:

hyperfine 'sleep 0.020' 'sleep 0.021' 'sleep 0.022' --export-json sleep.json
uvx --from 'git+https://github.com/sharkdp/hyperfine' \
  plot_whisker sleep.json

Replace plot_whisker with any of the following commands.

CommandDescription
plot_whiskerCompare benchmarks with a box and whisker plot
plot_histogramShow the distribution of measurements
plot_parametrizedPlot results from a parameter scan
plot_progressionShow measurements in run order
plot_benchmark_comparisonCompare commands across multiple JSON exports
advanced_statisticsPrint additional statistics and percentiles
welch_ttestCompare two benchmarks using Welch's t-test

By default, the plotting and analysis scripts use the metric that was selected first in the actual hyperfine run (--metrics option). Use --metric to select another metric:

uvx --from 'git+https://github.com/sharkdp/hyperfine' \
  plot_histogram benchmark.json --metric instructions