Skip to content

Commit b1326b8

Browse files
authored
feat(ci): codspeed benchmarking (#609)
* feat(ci): codspeed * feat(ci): codspeed * feat(ci): codspeed
1 parent f352882 commit b1326b8

File tree

3 files changed

+37
-67
lines changed

3 files changed

+37
-67
lines changed

.github/workflows/bencher.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/codspeed.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CodSpeed Benchmarks
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
# `workflow_dispatch` allows CodSpeed to trigger backtest
9+
# performance analysis in order to generate initial data.
10+
workflow_dispatch:
11+
12+
jobs:
13+
benchmarks:
14+
name: Run benchmarks
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
package:
19+
- engineioxide
20+
- socketioxide-parser-common
21+
- socketioxide-parser-msgpack
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Setup rust toolchain, cache and cargo-codspeed binary
25+
uses: moonrepo/setup-rust@v1
26+
with:
27+
channel: stable
28+
cache-target: release
29+
bins: cargo-codspeed
30+
- name: Build the benchmark target(s)
31+
run: cargo codspeed build -p ${{ matrix.package }} --all-features
32+
- name: Run the benchmarks
33+
uses: CodSpeedHQ/action@v4
34+
with:
35+
mode: instrumentation
36+
run: cargo codspeed run # only runs the built benchmarks

Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,5 @@ rmp = "0.8"
4747
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
4848
tokio-stream = "0.1"
4949
tokio-util = { version = "0.7", features = ["io"], default-features = false }
50-
criterion = { version = "0.5", features = [
51-
"rayon",
52-
"html_reports",
53-
], default-features = false }
50+
criterion = { package = "codspeed-criterion-compat", version = "*" }
5451
axum = "0.8"

0 commit comments

Comments
 (0)