Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
1c179a6e
Commit
1c179a6e
authored
Aug 25, 2014
by
dbarbera
Browse files
Show values in benchmark result table
parent
fa1b27b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/regression/benchmark.py
View file @
1c179a6e
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment