plot_benchmark_results.py
This file
Path
scripts/plot_benchmark_results.py
20 lines · 448 bytes · Python
Last changed by
Add script to plot benchmark resultssharkdpbefore adoption0ba8a20
History of this fileTake it
Add script to plot benchmark resultssharkdpbefore adoption0ba8a20
lines 1–20why, one step back1#!/usr/bin/python23import argparse4import json5import matplotlib.pyplot as plt67parser = argparse.ArgumentParser()8parser.add_argument("file", help="JSON file with benchmark results")9args = parser.parse_args()1011with open(args.file) as f:12 results = json.load(f)["results"]1314commands = [b["command"] for b in results]15times = [b["times"] for b in results]1617plt.boxplot(times, labels=commands)18plt.ylabel("Time [s]")19plt.ylim(0, None)20plt.show()