Commit 1c179a6e authored by dbarbera's avatar dbarbera
Browse files

Show values in benchmark result table

parent fa1b27b5
......@@ -74,15 +74,18 @@ def summarize(results, errors, elapsed):
print "Time: Ada %.2f%% LLVM %.2f%%" % diff([r["time"] for r in results])
print ""
headers = ["Benchmark", "Ada size", "LLVM size", "Ada time", "LLVM time"]
headers = ["Benchmark", "Ada size (B)", "LLVM size (B)", "Ada time (us)", "LLVM time (us)"]
table = []
for result in results:
row = [result["name"]]
row.extend(diff([result["size"]]))
row.extend(diff([result["time"]]))
table.append(row)
print tabulate(table, headers, tablefmt="orgtbl", floatfmt=".2f")
table.append([
result["name"],
result["size"]["ada"],
result["size"]["llvm"],
int(round(result["time"]["ada"] * (10 ** 6))),
int(round(result["time"]["llvm"] * (10 ** 6))),
])
print tabulate(table, headers, tablefmt="orgtbl")
return 0 if results and not errors else 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment