Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simcha van Collem
Iris
Commits
2074187f
Commit
2074187f
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
make plots with many lines more readable
parent
e1067d01
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmark/visualize.py
+8
-6
8 additions, 6 deletions
benchmark/visualize.py
with
8 additions
and
6 deletions
benchmark/visualize.py
+
8
−
6
View file @
2074187f
#!/usr/bin/env python3
#!/usr/bin/env python3
import
argparse
,
sys
,
pprint
import
argparse
,
sys
,
pprint
,
itertools
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
parse_log
import
parse_log
...
@@ -10,17 +10,19 @@ parser.add_argument("-f", "--file",
...
@@ -10,17 +10,19 @@ parser.add_argument("-f", "--file",
help
=
"
Filename to get the data from.
"
)
help
=
"
Filename to get the data from.
"
)
parser
.
add_argument
(
"
-t
"
,
"
--timings
"
,
nargs
=
'
+
'
,
parser
.
add_argument
(
"
-t
"
,
"
--timings
"
,
nargs
=
'
+
'
,
dest
=
"
timings
"
,
dest
=
"
timings
"
,
help
=
"
The names of the Coq files (without the extension) whose timings should be extracted
"
)
help
=
"
The names of the Coq files (
with or
without the extension) whose timings should be extracted
"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
pp
=
pprint
.
PrettyPrinter
()
pp
=
pprint
.
PrettyPrinter
()
log_file
=
sys
.
stdin
if
args
.
file
==
"
-
"
else
open
(
args
.
file
,
"
r
"
)
log_file
=
sys
.
stdin
if
args
.
file
==
"
-
"
else
open
(
args
.
file
,
"
r
"
)
results
=
list
(
parse_log
.
parse
(
log_file
,
args
.
timings
))
timings
=
list
(
map
(
lambda
t
:
t
[:
-
2
]
if
t
.
endswith
(
"
.v
"
)
else
t
,
args
.
timings
))
results
=
list
(
parse_log
.
parse
(
log_file
,
timings
))
for
timing
in
args
.
timings
:
markers
=
itertools
.
cycle
([(
3
,
0
),
(
3
,
0
,
180
),
(
4
,
0
),
(
4
,
0
,
45
),
(
8
,
0
)])
plt
.
plot
(
list
(
map
(
lambda
r
:
r
.
times
[
timing
],
results
)))
for
timing
in
timings
:
plt
.
plot
(
list
(
map
(
lambda
r
:
r
.
times
.
get
(
timing
),
results
)),
marker
=
next
(
markers
),
markersize
=
8
)
plt
.
legend
(
args
.
timings
)
plt
.
legend
(
timings
)
plt
.
xticks
(
range
(
len
(
results
)),
list
(
map
(
lambda
r
:
r
.
commit
[:
7
],
results
)),
rotation
=
70
)
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
.
subplots_adjust
(
bottom
=
0.2
)
# more space for the commit labels
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment