Skip to content

Commit 0a38d94

Browse files
author
rmlu
committed
(depfast) support depfast-copilot
1 parent ea282a3 commit 0a38d94

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@
170170
# depfast
171171
parser.add_argument('--depfast_concurrency', type = int, default = 100,
172172
help='[Benchmark] The number of concurrent threads in depfast')
173+
parser.add_argument('--depfast_scheme', type = str, default = "fpga_raft",
174+
choices=['fpga_raft', 'copilot'],
175+
help='[Benchmark] Depfast scheme')
173176

174177

175178
def main(args):
@@ -384,7 +387,8 @@ def main(args):
384387
# sys.test()
385388
elif sys_name == 'depfast':
386389
benchmark = DEFAULT_DEPFAST(exec_time_ = args.bench_exec_time,
387-
concurrency_ = args.depfast_concurrency)
390+
concurrency_ = args.depfast_concurrency,
391+
scheme_ = args.depfast_scheme)
388392
sys = depfast.Depfast(sys_name_ = sys_name,
389393
fault_ = fault,
390394
benchmark_ = benchmark,

tools/docker-depfast/docker-compose.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ services:
1414
- 5556:5556
1515
- 10000:10000
1616
command: tail -f /dev/null
17+
cap_add:
18+
- NET_ADMIN
1719

1820
server2:
1921
image: rmlu/depfast:latest
@@ -28,6 +30,8 @@ services:
2830
- 10001:10001
2931
- 31235:22
3032
command: tail -f /dev/null
33+
cap_add:
34+
- NET_ADMIN
3135

3236
server3:
3337
image: rmlu/depfast:latest
@@ -42,6 +46,8 @@ services:
4246
- 31236:22
4347
- 10002:10002
4448
command: tail -f /dev/null
49+
cap_add:
50+
- NET_ADMIN
4551

4652
server4:
4753
image: rmlu/depfast:latest
@@ -56,6 +62,8 @@ services:
5662
- 31237:22
5763
- 10003:10003
5864
command: tail -f /dev/null
65+
cap_add:
66+
- NET_ADMIN
5967

6068
server5:
6169
image: rmlu/depfast:latest
@@ -70,6 +78,8 @@ services:
7078
- 31238:22
7179
- 10004:10004
7280
command: tail -f /dev/null
81+
cap_add:
82+
- NET_ADMIN
7383

7484
client:
7585
image: rmlu/depfast:latest
@@ -83,6 +93,8 @@ services:
8393
- 31239:22
8494
- 5555:5555
8595
command: tail -f /dev/null
96+
cap_add:
97+
- NET_ADMIN
8698

8799
networks:
88100
depfast:

xinda/configs/benchmark.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,10 @@ class DEFAULT_DEPFAST(Benchmark):
229229
def __init__(self,
230230
exec_time_ : str,
231231
concurrency_ : int,
232+
scheme_ : str,
232233
workload_ = 'depfast',):
233234
self.benchmark = 'depfast'
235+
self.scheme = scheme_
234236
self.exec_time = exec_time_
235237
self.workload = workload_
236238
self.identifier = workload_

xinda/systems/depfast.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ def _init_depfast(self):
4848
cmd = ["./config.sh"]
4949
p = subprocess.run(cmd, shell=True, cwd=self.tool.compose)
5050
self.info("depfast initiated.")
51+
self.info(f'depfast_scheme: {self.benchmark.scheme}')
5152

5253
def _run_depfast(self):
53-
cmd = f"docker exec -it {self.client} bash start-exp.sh testname {self.benchmark.exec_time} 0 3 follower 1 {self.benchmark.concurrency} fpga_raft nonlocal"
54+
cmd = f"docker exec -it {self.client} bash start-exp.sh testname {self.benchmark.exec_time} 0 3 follower 1 {self.benchmark.concurrency} {self.benchmark.scheme} nonlocal"
5455
self.depfast_process = subprocess.Popen(cmd, shell=True, stdout=open(self.log.runtime,"w"))
5556
self.start_time = int(time.time()*1e9)
5657
self.info("Benchmark:depfast starts.", rela=self.start_time)

0 commit comments

Comments
 (0)