mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-28 08:08:58 +00:00
Before this patch, executing directly one of these scripts, for example `./plot_hystogram.py` in a unix-like environment meant that the default system-level python would be used, regardless of an eventual activated virtualenv. This was due to the "#!/usr/bin/python" shebang. Changing it to "/usr/bin/env python" is a fairly standard practice, keeps intact the compatiblity with the system level python, and allows a user to run in a virtualenv if he wants.
This folder contains scripts that can be used in combination with hyperfines --export-json option.
Example:
> hyperfine 'sleep 0.020' 'sleep 0.021' 'sleep 0.022' --export-json sleep.json
> python plot_benchmark_results.py sleep.json
Pre-requisites
To make these scripts work, you will need to install numpy and matplotlib. Install them via
your package manager or pip:
pip install numpy matplotlib # pip3, if you are using python3