mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 09:01:25 +00:00
Fix computation of min/max time range
This commit is contained in:
1 parent
a7e2889566
commit
dab1da98b6
1 file changed
+4
-1
@@ -18,12 +18,15 @@ 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]
|
||||||
|
|
||||||
|
t_min = np.min(list(map(np.min, all_times)))
|
||||||
|
t_max = np.max(list(map(np.max, all_times)))
|
||||||
|
|
||||||
plt.hist(
|
plt.hist(
|
||||||
all_times,
|
all_times,
|
||||||
label=commands,
|
label=commands,
|
||||||
bins="auto",
|
bins="auto",
|
||||||
histtype="bar",
|
histtype="bar",
|
||||||
range=(np.min(all_times), np.max(all_times)),
|
range=(t_min, t_max),
|
||||||
)
|
)
|
||||||
plt.legend(prop={"family": ["Source Code Pro", "Fira Mono", "Courier New"]})
|
plt.legend(prop={"family": ["Source Code Pro", "Fira Mono", "Courier New"]})
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user