Skip to content

Instantly share code, notes, and snippets.

@sharkdp
Created March 21, 2018 22:19
Show Gist options
  • Save sharkdp/e1712590690aa95df65f5a73751d33a9 to your computer and use it in GitHub Desktop.
Save sharkdp/e1712590690aa95df65f5a73751d33a9 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import argparse
import json
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser()
parser.add_argument("results", help="JSON file with benchmark results")
args = parser.parse_args()
with open(args.results) as f:
results = json.load(f)["results"]
commands = [b["command"] for b in results]
times = [b["times"] for b in results]
plt.boxplot(times, labels=commands)
plt.ylabel("Time [s]")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment