Skip to content

Commit e6b28c2

Browse files
Set up criterion for benchmarking (#197)
1 parent 961d830 commit e6b28c2

File tree

5 files changed

+269
-170
lines changed

5 files changed

+269
-170
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ jobs:
6161
with:
6262
toolchain: ${{ matrix.rust-version }}
6363

64+
- name: Generate MSRV-compatible lockfile
65+
if: matrix.rust-version == needs.resolve.outputs.MSRV
66+
run: |
67+
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback cargo +stable update
68+
6469
- uses: Swatinem/rust-cache@v2
6570
- uses: taiki-e/install-action@cargo-llvm-cov
6671

crates/jiter/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ python = ["dep:pyo3", "dep:pyo3-build-config"]
2727
num-bigint = ["dep:num-bigint", "pyo3?/num-bigint"]
2828

2929
[dev-dependencies]
30-
bencher = "0.1.5"
3130
paste = "1.0.7"
3231
serde_json = { version = "1.0.87", features = [
3332
"preserve_order",
@@ -36,7 +35,7 @@ serde_json = { version = "1.0.87", features = [
3635
] }
3736
serde = "1.0.147"
3837
pyo3 = { workspace = true, features = ["auto-initialize"] }
39-
codspeed-bencher-compat = "2.7.1"
38+
codspeed-criterion-compat = "2.7.2"
4039

4140
[build-dependencies]
4241
pyo3-build-config = { workspace = true, optional = true }

crates/jiter/benches/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Benchmarks
2+
3+
Before running benchmarks, make sure to generate `big.json`:
4+
5+
```shell
6+
python3 ./crates/jiter/benches/generate_big.py
7+
```
8+
9+
To run benchmarks, run:
10+
11+
```shell
12+
cargo bench -p jiter
13+
```

0 commit comments

Comments
 (0)