mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-03 01:21:25 +00:00
Show the full range in histograms
Branch: master
This commit is contained in:
1 parent
3a99fe2f75
commit
a3f0278074
1 file changed
+6
-1
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
|
import numpy as np
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
@@ -17,7 +18,11 @@ with open(args.file) as f:
|
|||||||
commands = [b["command"] for b in results]
|
commands = [b["command"] for b in results]
|
||||||
all_times = [b["times"] for b in results]
|
all_times = [b["times"] for b in results]
|
||||||
|
|
||||||
plt.hist(all_times, label=commands, bins="auto", histtype="bar")
|
plt.hist(all_times,
|
||||||
|
label=commands,
|
||||||
|
bins="auto",
|
||||||
|
histtype="bar",
|
||||||
|
range=(np.min(all_times), np.max(all_times)))
|
||||||
plt.legend(prop={'family': ['Source Code Pro', 'Fira Mono', 'Courier New']})
|
plt.legend(prop={'family': ['Source Code Pro', 'Fira Mono', 'Courier New']})
|
||||||
|
|
||||||
plt.xlabel("Time [s]")
|
plt.xlabel("Time [s]")
|
||||||
|
|||||||
Reference in new issue
Block a user