File tree 2 files changed +47
-29
lines changed
2 files changed +47
-29
lines changed Original file line number Diff line number Diff line change
1
+ name : Bench
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ heaptrack :
7
+ description : ' Run heaptrack memory benchmark'
8
+ required : true
9
+ default : false
10
+ type : boolean
11
+
12
+ jobs :
13
+ heaptrack :
14
+ if : ${{ github.event.inputs.heaptrack == 'true' }}
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ - uses : dtolnay/rust-toolchain@master
19
+ with :
20
+ toolchain : stable
21
+ - uses : actions/cache@v4
22
+ with :
23
+ path : |
24
+ ~/.cargo/bin/
25
+ ~/.cargo/registry/index/
26
+ ~/.cargo/registry/cache/
27
+ ~/.cargo/git/db/
28
+ target/
29
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-heaptrack
30
+ - name : Install heaptrack
31
+ run : sudo apt-get install -y heaptrack
32
+ - name : Build server && client
33
+ run : cargo build -r -p heaptrack && cargo build -r -p heaptrack --bin heaptrack-client
34
+ - name : Run memory benchmark
35
+ run : heaptrack target/release/heaptrack > server.txt & ./target/release/heaptrack-client > client.txt
36
+ - name : Server output
37
+ if : always()
38
+ run : cat server.txt
39
+ - name : Client output
40
+ if : always()
41
+ run : cat client.txt
42
+ - name : Publish memory benchmark
43
+ uses : actions/upload-artifact@v4
44
+ with :
45
+ name : heaptrack-${{ github.head_ref }}.${{ github.sha }}
46
+ path : heaptrack.heaptrack.*
Original file line number Diff line number Diff line change @@ -251,32 +251,4 @@ jobs:
251
251
run : cat server.txt
252
252
- name : Client output
253
253
if : always()
254
- run : cat client.txt
255
-
256
- heaptrack :
257
- runs-on : ubuntu-latest
258
- steps :
259
- - uses : actions/checkout@v4
260
- - uses : dtolnay/rust-toolchain@master
261
- with :
262
- toolchain : stable
263
- - uses : actions/cache@v4
264
- with :
265
- path : |
266
- ~/.cargo/bin/
267
- ~/.cargo/registry/index/
268
- ~/.cargo/registry/cache/
269
- ~/.cargo/git/db/
270
- target/
271
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-heaptrack
272
- - name : Install heaptrack
273
- run : sudo apt-get install -y heaptrack
274
- - name : Build server && client
275
- run : cargo build -r -p heaptrack
276
- - name : Run memory benchmark
277
- run : heaptrack target/release/heaptrack & sleep 1 && ./target/release/heaptrack-client && kill -SIGINT $!
278
- - name : Publish memory benchmark
279
- uses : actions/upload-artifact@v4
280
- with :
281
- name : heaptrack-${{ github.head_ref }}.${{ github.sha }}
282
- path : heaptrack.heaptrack.*
254
+ run : cat client.txt
You can’t perform that action at this time.
0 commit comments