-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (65 loc) · 2.09 KB
/
benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Benchmark
on: workflow_dispatch
jobs:
cleanup:
name: cleanup
runs-on: ubuntu-latest
steps:
- name: cleanup old results
uses: appleboy/[email protected]
with:
host: apt014.apt.emulab.net
username: ${{ secrets.CLOUDLAB_USERNAME }}
key: ${{ secrets.CLOUDLAB_PRIVATE_KEY }}
port: ${{ secrets.CLOUDLAB_PORT }}
passphrase: ${{ secrets.CLOUDLAB_PASSPHRASE }}
script: |
> /proj/schedock-PG0/thallium_result
> /proj/schedock-PG0/flight_result
benchmark:
needs: [cleanup]
strategy:
matrix:
protocol: [thallium, flight]
selectivity: [100, 10, 1]
max-parallel: 1
name: benchmark
runs-on: ubuntu-latest
steps:
- name: start server
uses: appleboy/[email protected]
with:
host: apt014.apt.emulab.net
username: ${{ secrets.CLOUDLAB_USERNAME }}
key: ${{ secrets.CLOUDLAB_PRIVATE_KEY }}
port: ${{ secrets.CLOUDLAB_PORT }}
passphrase: ${{ secrets.CLOUDLAB_PASSPHRASE }}
script: |
cd ~/thallium-arrow-transport
sudo ./scripts/${{ matrix.protocol }}_server.sh ${{ matrix.selectivity }} >out.log 2>err.log &
echo $! > /tmp/pid
cat /tmp/pid
- name: run client
uses: appleboy/[email protected]
if: ${{ success() }}
with:
host: apt016.apt.emulab.net
username: ${{ secrets.CLOUDLAB_USERNAME }}
key: ${{ secrets.CLOUDLAB_PRIVATE_KEY }}
port: ${{ secrets.CLOUDLAB_PORT }}
passphrase: ${{ secrets.CLOUDLAB_PASSPHRASE }}
script: |
cd ~/thallium-arrow-transport
sudo ./scripts/${{ matrix.protocol }}_client.sh
- name: kill server
uses: appleboy/[email protected]
if: ${{ always() }}
with:
host: apt014.apt.emulab.net
username: ${{ secrets.CLOUDLAB_USERNAME }}
key: ${{ secrets.CLOUDLAB_PRIVATE_KEY }}
port: ${{ secrets.CLOUDLAB_PORT }}
passphrase: ${{ secrets.CLOUDLAB_PASSPHRASE }}
script: |
pid=$(cat /tmp/pid)
sudo rkill $pid