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
name: "Benchmarks: Rust"
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'docs/**'
- 'mkdocs.yml'
- 'LICENSE'
- '.gitignore'
- '.beads/**'
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
- 'mkdocs.yml'
- 'LICENSE'
- '.gitignore'
- '.beads/**'
workflow_dispatch:
permissions:
contents: read
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmarks:
name: Run benchmarks
runs-on: ubuntu-latest
timeout-minutes: 30
# Dependency bumps don't need the CodSpeed perf gate; skip for dependabot.
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v6.0.3
- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
channel: stable
cache-target: release
bins: cargo-codspeed
- name: Build benchmarks
# Allowlist the single-threaded criterion benches. parallel_benchmarks
# is excluded: Valgrind serializes threads under simulation mode, so
# rayon speedup cannot be measured there (its sequential baselines
# duplicate marc_benchmarks' read_* coverage). Run it locally with
# criterion for real walltime numbers. The remaining bench targets are
# print-only profiling harnesses that produce no CodSpeed signal.
run: cargo codspeed build --bench marc_benchmarks --bench error_handling_benchmarks
- name: Run benchmarks
uses: CodSpeedHQ/action@v4.17.0
with:
run: cargo codspeed run
mode: simulation