-
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (55 loc) · 1.84 KB
/
Copy pathbench.yml
File metadata and controls
61 lines (55 loc) · 1.84 KB
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
name: Benchmark
on:
pull_request:
paths:
- 'bench/**'
- 'server/src/storage/**'
- '.github/workflows/bench.yml'
# The image decides which build an operator actually runs, so a change to
# it has to bring its own numbers.
- 'Dockerfile'
- 'Cargo.toml'
workflow_dispatch:
permissions:
contents: read
jobs:
throughput:
# Both builds, because the image ships musl and musl allocates differently
# under threads. Reading one number and shipping the other is how a
# regression gets published as a measurement.
name: Throughput (${{ matrix.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: host
target: ''
- name: musl
target: x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Cache cargo
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-bench-${{ matrix.name }}-${{ hashFiles('Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-bench-${{ matrix.name }}-
# ring and zstd are C, so a musl build needs a musl C compiler. cc-rs
# picks up musl-gcc on its own once it is on the path.
- name: Install the musl toolchain
if: matrix.target != ''
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends musl-tools
- name: Measure
env:
LARGE_MIB: '1024'
SMALL_COUNT: '1000'
TARGET: ${{ matrix.target }}
run: |
set -o pipefail
bash bench/throughput.sh | tee "$GITHUB_STEP_SUMMARY"