Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iris
Iris
Commits
500176fd
Commit
500176fd
authored
Feb 24, 2016
by
Ralf Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the visualizer visual
parent
66bb3579
Pipeline
#133
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
benchmark/visualize.py
benchmark/visualize.py
+15
-4
No files found.
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
Markdown
is supported
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