Skip to content

Commit bb0d073

Browse files
committed
feat: add CodSpeed to the project
1 parent 87bf852 commit bb0d073

4 files changed

Lines changed: 36 additions & 3 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: codspeed-benchmarks
2+
3+
on:
4+
# Run on pushes to the main branch
5+
push:
6+
branches:
7+
- "main"
8+
# Run on pull requests
9+
pull_request:
10+
# `workflow_dispatch` allows CodSpeed to trigger backtest
11+
# performance analysis in order to generate initial data.
12+
workflow_dispatch:
13+
14+
jobs:
15+
benchmarks:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Setup rust toolchain, cache and cargo-codspeed binary
20+
uses: moonrepo/setup-rust@v1
21+
with:
22+
cache-target: release
23+
bins: cargo-codspeed
24+
25+
- name: Build the benchmark target(s)
26+
run: |
27+
cargo codspeed build --workspace --exclude neqo-common --features bench
28+
cargo codspeed build -p neqo-common
29+
30+
- name: Run the benchmarks
31+
uses: CodSpeedHQ/action@v2
32+
with:
33+
run: cargo codspeed run

neqo-bin/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ tokio = { version = "1", default-features = false, features = ["net", "time", "m
4141
url = { version = "2.5", default-features = false }
4242

4343
[dev-dependencies]
44-
criterion = { version = "0.5", default-features = false, features = ["html_reports", "async_tokio"] }
44+
criterion = { package="codspeed-criterion-compat", version = "2.6.0", default-features = false, features = ["html_reports", "async_tokio"] }
4545
tokio = { version = "1", default-features = false, features = ["sync"] }
4646

4747
[features]

neqo-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ qlog = { workspace = true }
2222
time = { version = "0.3", default-features = false, features = ["formatting"] }
2323

2424
[dev-dependencies]
25-
criterion = { version = "0.5", default-features = false, features = ["html_reports"] }
25+
criterion = { package="codspeed-criterion-compat", version = "2.6.0", default-features = false, features = ["html_reports"] }
2626
test-fixture = { path = "../test-fixture" }
2727

2828
[features]

neqo-transport/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ qlog = { workspace = true }
2222
smallvec = { version = "1.11", default-features = false }
2323

2424
[dev-dependencies]
25-
criterion = { version = "0.5", default-features = false, features = ["html_reports"] }
25+
criterion = { package="codspeed-criterion-compat", version = "2.6.0", default-features = false, features = ["html_reports"] }
2626
test-fixture = { path = "../test-fixture" }
2727

2828
[features]

0 commit comments

Comments
 (0)