mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-28 16:18:57 +00:00
Refine JSON schema and command metadata
This commit is contained in:
1 parent
c5d3a81fc5
commit
0d86e78ede
15 files changed
+59
-60
No files matched your search
@@ -52,7 +52,7 @@ with open(args.file) as f:
|
||||
results = json.load(f)["results"]
|
||||
|
||||
for result in results:
|
||||
label = result["command"]
|
||||
label = result.get("name", result["command"])
|
||||
times = [m["time_wall_clock"]["value"] for m in result["measurements"]]
|
||||
num = len(times)
|
||||
nums = range(num)
|
||||
@@ -76,7 +76,7 @@ if args.title:
|
||||
|
||||
legend = []
|
||||
for result in results:
|
||||
legend.append(result["command"])
|
||||
legend.append(result.get("name", result["command"]))
|
||||
if not args.no_moving_average:
|
||||
legend.append("moving average")
|
||||
plt.legend(legend)
|
||||
|
||||
Reference in new issue
Block a user