Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pydtnsim
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
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
discus
pydtnsim
Commits
bcf422a9
Commit
bcf422a9
authored
7 years ago
by
Jarrod Pas
Browse files
Options
Downloads
Patches
Plain Diff
Remove old runner summary
parent
84985eb7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!3
Version 0.2
,
!1
Full rewrite
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
util/runner_all_summary
+0
-65
0 additions, 65 deletions
util/runner_all_summary
with
0 additions
and
65 deletions
util/runner_all_summary
deleted
100755 → 0
+
0
−
65
View file @
84985eb7
#!/usr/bin/env python3
from
collections
import
defaultdict
import
re
import
sys
import
ggplot
as
gg
import
pandas
import
yaml
def
record_from_log
(
log
):
log_path
=
log
with
open
(
log
)
as
log
:
# filter out garbage in log
log
=
re
.
findall
(
r
'
\w+:.*
'
,
log
.
read
())
log
=
'
\n
'
.
join
(
log
)
return
yaml
.
load
(
log
)
if
__name__
==
'
__main__
'
:
routers
=
set
()
traces
=
defaultdict
(
list
)
for
log
in
sys
.
argv
[
1
:]:
record
=
record_from_log
(
log
)
record
[
'
trace
'
]
=
re
.
sub
(
r
'
.*(shed\d).*
'
,
'
\\
1
'
,
record
[
'
trace
'
])
if
record
[
'
community
'
]
!=
'
none
'
:
record
[
'
router
'
]
+=
'
_
'
+
record
[
'
community
'
]
routers
.
add
(
record
[
'
router
'
])
del
record
[
'
community
'
]
traces
[
record
[
'
trace
'
]].
append
(
record
)
traces
=
{
trace
:
pandas
.
DataFrame
.
from_records
(
records
)
for
trace
,
records
in
traces
.
items
()
}
def
get_router
(
trace
,
router
):
trace
=
traces
[
trace
]
return
trace
[
trace
[
'
router
'
]
==
router
]
summary
=
[]
for
trace
in
traces
:
for
router
in
routers
:
df
=
get_router
(
trace
,
router
).
mean
()
df
[
'
trace
'
]
=
trace
df
[
'
router
'
]
=
router
summary
.
append
(
df
)
summary
=
pandas
.
DataFrame
.
from_records
(
summary
)
for
router
in
routers
:
aes
=
gg
.
aes
(
x
=
'
trace
'
,
y
=
'
delivery_ratio
'
,
weight
=
'
delivery_ratio
'
,
)
plt
=
gg
.
ggplot
(
aes
,
summary
[
summary
[
'
router
'
]
==
router
])
plt
+=
gg
.
geom_bar
()
plt
+=
gg
.
ggtitle
(
f
'
{
router
}
'
)
plt
+=
gg
.
ylim
(
low
=
0
,
high
=
1
)
plt
.
save
(
f
'
{
router
}
.png
'
,
width
=
8
,
height
=
6
,
dpi
=
300
)
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