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): ...@@ -74,15 +74,18 @@ def summarize(results, errors, elapsed):
print "Time: Ada %.2f%% LLVM %.2f%%" % diff([r["time"] for r in results]) print "Time: Ada %.2f%% LLVM %.2f%%" % diff([r["time"] for r in results])
print "" 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 = [] table = []
for result in results: for result in results:
row = [result["name"]] table.append([
row.extend(diff([result["size"]])) result["name"],
row.extend(diff([result["time"]])) result["size"]["ada"],
table.append(row) result["size"]["llvm"],
int(round(result["time"]["ada"] * (10 ** 6))),
print tabulate(table, headers, tablefmt="orgtbl", floatfmt=".2f") int(round(result["time"]["llvm"] * (10 ** 6))),
])
print tabulate(table, headers, tablefmt="orgtbl")
return 0 if results and not errors else 1 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