Skip to content

Commit a10c0e2

Browse files
committed
chore: fallback to codspeed feature
1 parent 9f80d31 commit a10c0e2

File tree

4 files changed

+29
-119
lines changed

4 files changed

+29
-119
lines changed

.github/workflows/benchmark.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
- uses: ./.github/actions/pnpm
4444
- name: Build Benchmark
4545
env:
46-
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g"
47-
run: cargo codspeed build
46+
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g --cfg codspeed"
47+
run: cargo codspeed build --features codspeed
4848

4949
- name: Run benchmark
5050
uses: CodSpeedHQ/action@v3

Cargo.lock

Lines changed: 23 additions & 114 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ tokio = { version = "1.42.0", default-features = false, features = ["sync", "rt"
102102
[dev-dependencies]
103103
vfs = "0.12.0" # for testing with in memory file system
104104
rayon = { version = "1.10.0" }
105-
criterion2 = { version = "2.0.0", default-features = false, package = "codspeed-criterion-compat", features = ["async_tokio"]}
105+
criterion2 = { version = "2.0.0", default-features = false, features = ["async_tokio"]}
106106
normalize-path = { version = "0.2.1" }
107107

108108
[features]
@@ -112,6 +112,8 @@ default = ["yarn_pnp"]
112112
package_json_raw_json_api = []
113113
## [Yarn Plug'n'Play](https://yarnpkg.com/features/pnp)
114114
yarn_pnp = ["pnp"]
115+
# For codspeed benchmark
116+
codspeed = ["criterion2/codspeed"]
115117

116118
[package.metadata.docs.rs]
117119
all-features = true

benches/resolver.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use criterion2::{criterion_group, criterion_main, BenchmarkId, Criterion};
2-
use rayon::prelude::*;
1+
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
32
use serde_json::Value;
43
use std::fs::read_to_string;
54
use std::future::Future;

0 commit comments

Comments
 (0)