-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (57 loc) · 1.75 KB
/
benchmark.yml
File metadata and controls
68 lines (57 loc) · 1.75 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
62
63
64
65
66
67
68
name: Benchmarks
permissions:
contents: read
on:
push:
branches: "main"
paths:
- '.github/workflows/benchmark*.yml'
- 'Cargo.toml'
- 'Cargo.lock'
- 'benches/**'
- 'crates/**'
env:
CARGO_TERM_COLOR: always
jobs:
bench_main:
permissions:
checks: write
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install Rust
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Rust Cache
uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
- name: Install protobuf-compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- uses: bencherdev/bencher@main
- name: Track base branch benchmarks with Bencher
run: |
bencher run \
--project keystone \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch main \
--testbed ${{ matrix.os }} \
--threshold-measure latency \
--threshold-test t_test \
--threshold-max-sample-size 64 \
--threshold-upper-boundary 0.99 \
--thresholds-reset \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--adapter rust_criterion \
cargo bench --features bench_internals