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
13bcc4a1
Commit
13bcc4a1
authored
Dec 07, 2020
by
Hejing Li
Browse files
result: add udp_scale data parser
parent
379f31a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
results/udp_scale.py
results/udp_scale.py
+32
-0
No files found.
results/udp_scale.py
0 → 100644
View file @
13bcc4a1
import
sys
import
os
import
pathlib
import
shutil
import
json
if
len
(
sys
.
argv
)
!=
2
:
print
(
'Usage: udp_scale.py OUTDIR'
)
sys
.
exit
(
1
)
basedir
=
sys
.
argv
[
1
]
+
'/'
types_of_client
=
[
1
,
3
,
7
,
15
,
31
]
bw
=
1000
for
cl
in
types_of_client
:
log_path
=
'%sgt-ib-switch-UDPmicro-%d-%d-1.json'
%
(
basedir
,
bw
,
cl
)
try
:
log
=
open
(
log_path
,
'r'
)
except
:
print
(
f
'no file:
{
log_path
}
'
)
continue
else
:
exp_log
=
json
.
load
(
log
)
start_time
=
exp_log
[
"start_time"
]
end_time
=
exp_log
[
"end_time"
]
diff_time
=
(
end_time
-
start_time
)
/
60
#min
print
(
diff_time
)
log
.
close
()
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