Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joshua Yanovski
iris-coq
Commits
500176fd
Commit
500176fd
authored
Feb 24, 2016
by
Ralf Jung
Browse files
make the visualizer visual
parent
66bb3579
Changes
1
Hide whitespace changes
Inline
Side-by-side
benchmark/visualize.py
View file @
500176fd
#!/usr/bin/env python3
import
argparse
,
sys
,
pprint
import
matplotlib.pyplot
as
plt
import
parse_log
# read command-line arguments
...
...
@@ -14,7 +15,17 @@ args = parser.parse_args()
pp
=
pprint
.
PrettyPrinter
()
log_file
=
sys
.
stdin
if
args
.
file
==
"-"
else
open
(
args
.
file
,
"r"
)
for
result
in
parse_log
.
parse
(
log_file
,
args
.
timings
):
pp
.
pprint
(
result
.
commit
)
pp
.
pprint
(
result
.
times
)
print
()
results
=
list
(
parse_log
.
parse
(
log_file
,
args
.
timings
))
for
timing
in
args
.
timings
:
plt
.
plot
(
list
(
map
(
lambda
r
:
r
.
times
[
timing
],
results
)))
plt
.
legend
(
args
.
timings
)
plt
.
xticks
(
range
(
len
(
results
)),
list
(
map
(
lambda
r
:
r
.
commit
[:
7
],
results
)),
rotation
=
70
)
plt
.
subplots_adjust
(
bottom
=
0.2
)
# more space for the commit labels
plt
.
xlabel
(
'Commit'
)
plt
.
ylabel
(
'Time (s)'
)
plt
.
title
(
'Time to compile files'
)
plt
.
grid
(
True
)
plt
.
show
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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