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
88475623
Commit
88475623
authored
May 16, 2024
by
Marvin Meiers
Committed by
Antoine Kaufmann
May 17, 2024
Browse files
experiments: fix new pylint errors
parent
474d6aa9
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
84 additions
and
35 deletions
+84
-35
experiments/pyexps/ae/data_decmp.py
experiments/pyexps/ae/data_decmp.py
+4
-0
experiments/pyexps/ae/data_dist.py
experiments/pyexps/ae/data_dist.py
+4
-0
experiments/pyexps/gt_tcp_multi.py
experiments/pyexps/gt_tcp_multi.py
+9
-4
experiments/pyexps/gt_tcp_single.py
experiments/pyexps/gt_tcp_single.py
+10
-5
experiments/pyexps/gt_udp_multi.py
experiments/pyexps/gt_udp_multi.py
+9
-4
experiments/pyexps/memswitch.py
experiments/pyexps/memswitch.py
+4
-1
experiments/pyexps/memswitch_large.py
experiments/pyexps/memswitch_large.py
+4
-1
experiments/pyexps/qemu_tcp_multi.py
experiments/pyexps/qemu_tcp_multi.py
+9
-4
experiments/pyexps/qemu_tcp_single.py
experiments/pyexps/qemu_tcp_single.py
+11
-6
experiments/pyexps/qemu_udp_multi.py
experiments/pyexps/qemu_udp_multi.py
+9
-4
experiments/pyexps/qemu_udp_single.py
experiments/pyexps/qemu_udp_single.py
+11
-6
No files found.
experiments/pyexps/ae/data_decmp.py
View file @
88475623
...
...
@@ -36,6 +36,8 @@ if not os.path.isfile(out_file):
with
open
(
out_file
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
lines
=
f
.
readlines
()
start_time
=
None
end_time
=
None
for
line
in
lines
:
if
'start:'
in
line
:
start_time
=
float
(
line
.
split
()[
1
])
...
...
@@ -43,5 +45,7 @@ with open(out_file, 'r', encoding='utf-8') as f:
if
'end:'
in
line
:
end_time
=
float
(
line
.
split
()[
1
])
if
start_time
is
None
or
end_time
is
None
:
raise
RuntimeError
(
'could not find start/end time'
)
time_diff
=
end_time
-
start_time
print
(
f
'SimTime:
{
time_diff
}
(s)'
)
experiments/pyexps/ae/data_dist.py
View file @
88475623
...
...
@@ -55,6 +55,8 @@ for workload in types_of_host:
with
open
(
path_pat
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
read_lines
=
f
.
readlines
()
start_time
=
None
end_time
=
None
for
l
in
read_lines
:
if
'START'
in
l
:
start_time
=
float
(
l
.
split
()[
1
])
...
...
@@ -64,6 +66,8 @@ for workload in types_of_host:
end_time
=
float
(
l
.
split
()[
1
])
#print("end_time: %d" % end_time)
if
start_time
is
None
or
end_time
is
None
:
raise
RuntimeError
(
'could not find start/end time'
)
sim_time
=
(
end_time
-
start_time
)
/
60
line
.
append
(
f
'
{
sim_time
}
'
)
...
...
experiments/pyexps/gt_tcp_multi.py
View file @
88475623
...
...
@@ -46,10 +46,12 @@ for n in kinds_of_net:
if
n
==
'switch'
:
NetClass
=
sim
.
SwitchNet
if
n
==
'dumbbell'
:
el
if
n
==
'dumbbell'
:
NetClass
=
sim
.
NS3DumbbellNet
if
n
==
'bridge'
:
el
if
n
==
'bridge'
:
NetClass
=
sim
.
NS3BridgeNet
else
:
raise
ValueError
(
f
'unknown network type
{
n
}
'
)
# set nic sim
for
c
in
kinds_of_nic
:
...
...
@@ -81,7 +83,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'cb'
:
el
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -104,7 +106,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'ib'
:
el
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -127,6 +129,9 @@ for n in kinds_of_net:
ip_start
=
2
)
else
:
raise
ValueError
(
f
'unknown nic type
{
c
}
'
)
for
cl
in
clients
:
cl
.
wait
=
True
cl
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
...
...
experiments/pyexps/gt_tcp_single.py
View file @
88475623
...
...
@@ -43,12 +43,14 @@ experiments = []
for
n
in
kinds_of_net
:
if
n
==
'wire'
:
NetClass
=
sim
.
WireNet
if
n
==
'switch'
:
el
if
n
==
'switch'
:
NetClass
=
sim
.
SwitchNet
if
n
==
'dumbbell'
:
el
if
n
==
'dumbbell'
:
NetClass
=
sim
.
NS3DumbbellNet
if
n
==
'bridge'
:
el
if
n
==
'bridge'
:
NetClass
=
sim
.
NS3BridgeNet
else
:
raise
ValueError
(
f
'unknown network type
{
n
}
'
)
# set nic sim
for
c
in
kinds_of_nic
:
...
...
@@ -80,7 +82,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'cb'
:
el
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -103,7 +105,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'ib'
:
el
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -126,6 +128,9 @@ for n in kinds_of_net:
ip_start
=
2
)
else
:
raise
ValueError
(
f
'unknown nic type
{
c
}
'
)
clients
[
0
].
wait
=
True
clients
[
0
].
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
...
...
experiments/pyexps/gt_udp_multi.py
View file @
88475623
...
...
@@ -47,10 +47,12 @@ for n in kinds_of_net:
if
n
==
'switch'
:
NetClass
=
sim
.
SwitchNet
if
n
==
'dumbbell'
:
el
if
n
==
'dumbbell'
:
NetClass
=
sim
.
NS3DumbbellNet
if
n
==
'bridge'
:
el
if
n
==
'bridge'
:
NetClass
=
sim
.
NS3BridgeNet
else
:
raise
ValueError
(
f
'unknown network type
{
n
}
'
)
# set nic sim
for
c
in
kinds_of_nic
:
...
...
@@ -82,7 +84,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'cb'
:
el
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -105,7 +107,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'ib'
:
el
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -128,6 +130,9 @@ for n in kinds_of_net:
ip_start
=
2
)
else
:
raise
ValueError
(
f
'unknown nic type
{
c
}
'
)
for
cl
in
clients
:
cl
.
wait
=
True
cl
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
...
...
experiments/pyexps/memswitch.py
View file @
88475623
...
...
@@ -174,7 +174,7 @@ for mem_lat in num_mem_lat:
HostClass
=
gem5_kvm
if
h
==
'gt'
:
el
if
h
==
'gt'
:
def
gem5_timing
(
node_config
:
node
.
NodeConfig
):
gh
=
sim
.
Gem5Host
(
node_config
)
...
...
@@ -187,6 +187,9 @@ for mem_lat in num_mem_lat:
elif
h
==
'qk'
:
HostClass
=
sim
.
QemuHost
else
:
raise
ValueError
(
f
'unknown host type
{
h
}
'
)
# Add hosts
host_0
=
HostClass
(
node_config0
)
host_1
=
HostClass
(
node_config1
)
...
...
experiments/pyexps/memswitch_large.py
View file @
88475623
...
...
@@ -214,7 +214,7 @@ for mem_lat in num_mem_lat:
HostClass
=
gem5_kvm
if
h
==
'gt'
:
el
if
h
==
'gt'
:
def
gem5_timing
(
node_config
:
node
.
NodeConfig
):
gh
=
sim
.
Gem5Host
(
node_config
)
...
...
@@ -227,6 +227,9 @@ for mem_lat in num_mem_lat:
elif
h
==
'qk'
:
HostClass
=
sim
.
QemuHost
else
:
raise
ValueError
(
f
'unknown host type
{
h
}
'
)
# Add hosts
hosts
=
[]
for
i
in
range
(
num_hosts
):
...
...
experiments/pyexps/qemu_tcp_multi.py
View file @
88475623
...
...
@@ -45,10 +45,12 @@ for n in kinds_of_net:
if
n
==
'switch'
:
NetClass
=
sim
.
SwitchNet
if
n
==
'dumbbell'
:
el
if
n
==
'dumbbell'
:
NetClass
=
sim
.
NS3DumbbellNet
if
n
==
'bridge'
:
el
if
n
==
'bridge'
:
NetClass
=
sim
.
NS3BridgeNet
else
:
raise
ValueError
(
f
'unknown network type
{
n
}
'
)
# set nic sim
for
c
in
kinds_of_nic
:
...
...
@@ -79,7 +81,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'cb'
:
el
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -102,7 +104,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'ib'
:
el
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -125,6 +127,9 @@ for n in kinds_of_net:
ip_start
=
2
)
else
:
raise
ValueError
(
f
'unknown nic type
{
c
}
'
)
for
cl
in
clients
:
cl
.
wait
=
True
cl
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
...
...
experiments/pyexps/qemu_tcp_single.py
View file @
88475623
...
...
@@ -43,14 +43,16 @@ experiments = []
for
n
in
kinds_of_net
:
if
n
==
'wire'
:
NetClass
=
sim
.
WireNet
if
n
==
'switch'
:
el
if
n
==
'switch'
:
NetClass
=
sim
.
SwitchNet
if
n
==
'dumbbell'
:
el
if
n
==
'dumbbell'
:
NetClass
=
sim
.
NS3DumbbellNet
if
n
==
'bridge'
:
el
if
n
==
'bridge'
:
NetClass
=
sim
.
NS3BridgeNet
if
n
==
'tofino'
:
el
if
n
==
'tofino'
:
NetClass
=
sim
.
TofinoNet
else
:
raise
ValueError
(
f
'unknown network type
{
n
}
'
)
# set nic sim
for
c
in
kinds_of_nic
:
...
...
@@ -81,7 +83,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'cb'
:
el
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -104,7 +106,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'ib'
:
el
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -127,6 +129,9 @@ for n in kinds_of_net:
ip_start
=
2
)
else
:
raise
ValueError
(
f
'unknown nic type
{
c
}
'
)
clients
[
0
].
wait
=
True
clients
[
0
].
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
...
...
experiments/pyexps/qemu_udp_multi.py
View file @
88475623
...
...
@@ -47,10 +47,12 @@ for n in kinds_of_net:
if
n
==
'switch'
:
NetClass
=
sim
.
SwitchNet
if
n
==
'dumbbell'
:
el
if
n
==
'dumbbell'
:
NetClass
=
sim
.
NS3DumbbellNet
if
n
==
'bridge'
:
el
if
n
==
'bridge'
:
NetClass
=
sim
.
NS3BridgeNet
else
:
raise
ValueError
(
f
'unknown network type
{
n
}
'
)
# set nic sim
for
c
in
kinds_of_nic
:
...
...
@@ -81,7 +83,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'cb'
:
el
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -104,7 +106,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'ib'
:
el
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -127,6 +129,9 @@ for n in kinds_of_net:
ip_start
=
2
)
else
:
raise
ValueError
(
f
'unknown nic type
{
c
}
'
)
for
cl
in
clients
:
cl
.
wait
=
True
cl
.
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
...
...
experiments/pyexps/qemu_udp_single.py
View file @
88475623
...
...
@@ -45,14 +45,16 @@ experiments = []
for
n
in
kinds_of_net
:
if
n
==
'wire'
:
NetClass
=
sim
.
WireNet
if
n
==
'switch'
:
el
if
n
==
'switch'
:
NetClass
=
sim
.
SwitchNet
if
n
==
'dumbbell'
:
el
if
n
==
'dumbbell'
:
NetClass
=
sim
.
NS3DumbbellNet
if
n
==
'bridge'
:
el
if
n
==
'bridge'
:
NetClass
=
sim
.
NS3BridgeNet
if
n
==
'tofino'
:
el
if
n
==
'tofino'
:
NetClass
=
sim
.
TofinoNet
else
:
raise
ValueError
(
f
'unknown network type
{
n
}
'
)
# set nic sim
for
c
in
kinds_of_nic
:
...
...
@@ -83,7 +85,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'cb'
:
el
if
c
==
'cb'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -106,7 +108,7 @@ for n in kinds_of_net:
ip_start
=
2
)
if
c
==
'ib'
:
el
if
c
==
'ib'
:
servers
=
create_basic_hosts
(
e
,
1
,
...
...
@@ -129,6 +131,9 @@ for n in kinds_of_net:
ip_start
=
2
)
else
:
raise
ValueError
(
f
'unknown nic type
{
c
}
'
)
clients
[
0
].
wait
=
True
clients
[
0
].
node_config
.
app
.
server_ip
=
servers
[
0
].
node_config
.
ip
clients
[
0
].
node_config
.
app
.
rate
=
rate
...
...
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