Skip to content

Commit 60bfdfb

Browse files
committed
chore: just cargo bench
1 parent 666967b commit 60bfdfb

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/benchmark.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
- name: Setup benchmark data
3737
run: cd benches && pnpm install --ignore-workspace
3838

39+
- name: cargo bench
40+
run: cargo bench
41+
3942
- uses: Boshen/setup-rust@main
4043
with:
4144
cache-key: benchmark

benches/resolver.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ fn bench_resolver(c: &mut Criterion) {
119119
let count = std::thread::available_parallelism().expect("failed to get parallelism").get();
120120
eprintln!("the cups: {count}");
121121
// force to use four threads
122-
rayon::ThreadPoolBuilder::new().num_threads(4).build_global().expect("Failed to build global thread pool");
122+
rayon::ThreadPoolBuilder::new()
123+
.num_threads(4)
124+
.build_global()
125+
.expect("Failed to build global thread pool");
123126

124127
group.bench_with_input(BenchmarkId::from_parameter("single-thread"), &data, |b, data| {
125128
let oxc_resolver = oxc_resolver();

0 commit comments

Comments
 (0)