Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
eb7a8bc5
Commit
eb7a8bc5
authored
Dec 04, 2020
by
Hejing Li
Browse files
iperf.py: match Mbit pattern
parent
e250eb2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
results/utils/iperf.py
results/utils/iperf.py
+6
-2
No files found.
results/utils/iperf.py
View file @
eb7a8bc5
...
...
@@ -7,7 +7,7 @@ import itertools
import
sys
def
parse_iperf_run
(
data
,
skip
=
1
,
use
=
8
):
tp_pat
=
re
.
compile
(
r
'\[ *\d*\] *([0-9\.]*)- *([0-9\.]*) sec.*Bytes *([0-9\.]*)
G
bits.*'
)
tp_pat
=
re
.
compile
(
r
'\[ *\d*\] *([0-9\.]*)- *([0-9\.]*) sec.*Bytes *([0-9\.]*)
([GM])
bits.*'
)
tps_time
=
{}
for
hn
in
fnmatch
.
filter
(
data
[
'sims'
].
keys
(),
'host.client.*'
):
sim
=
data
[
'sims'
][
hn
]
...
...
@@ -25,7 +25,11 @@ def parse_iperf_run(data, skip=1, use=8):
if
not
time
in
tps_time
:
tps_time
[
time
]
=
[]
tps_time
[
time
].
append
(
float
(
m
.
group
(
3
)))
if
m
.
group
(
4
)
==
'G'
:
tps_time
[
time
].
append
(
float
(
m
.
group
(
3
)))
elif
m
.
group
(
4
)
==
'M'
:
m_tps
=
float
(
m
.
group
(
3
))
/
1000
tps_time
[
time
].
append
(
m_tps
)
tps
=
[]
for
t
in
sorted
(
tps_time
.
keys
()):
...
...
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