-
-
Notifications
You must be signed in to change notification settings - Fork 57
54 lines (52 loc) · 1.64 KB
/
bench.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
name: Bench
on:
workflow_dispatch:
inputs:
heaptrack:
description: "Run heaptrack memory benchmark"
required: true
default: false
type: boolean
jobs:
heaptrack:
if: ${{ github.event.inputs.heaptrack == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-heaptrack
- name: Install heaptrack
run: sudo apt-get install -y heaptrack
- name: Build server && client
run: cargo build -r -p heaptrack && npm i --prefix e2e/heaptrack
- name: Run memory benchmark
run: |
ulimit -n 20000
RUST_LOG="socketioxide=trace,engineioxide=trace,info" heaptrack target/release/heaptrack > server.txt &
cd e2e/heaptrack
node --experimental-strip-types client.ts > ../../client.txt &
sleep 60
kill $!
- name: Publish logs
uses: actions/upload-artifact@v4
with:
name: logs-${{ github.head_ref }}.${{ github.sha }}
path: "*.txt"
- name: Publish memory benchmark
uses: actions/upload-artifact@v4
with:
name: heaptrack-${{ github.head_ref }}.${{ github.sha }}
path: heaptrack.heaptrack.*