Skip to content

Commit cfda4b8

Browse files
committed
ci: fix codspeed
1 parent ea24c2e commit cfda4b8

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
tool: cargo-codspeed
5757
- name: Build benchmark
58-
run: cargo codspeed build --measurement-mode=walltime --features codspeed
58+
run: cargo codspeed build --features codspeed
5959
- name: Download fixtures
6060
uses: actions/download-artifact@v5
6161
with:

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ codspeed = ["criterion2/codspeed"]
2222
[[bench]]
2323
name = "escape"
2424
harness = false
25+
path = "benches/escape.rs"
2526

2627
[dependencies]
2728
sonic-simd = "0.1"

benches/escape.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ use std::{fs, hint::black_box};
22

33
use criterion::{Criterion, criterion_group, criterion_main};
44

5+
#[cfg(not(feature = "codspeed"))]
56
use generic::escape_generic;
67
use json_escape_simd::escape;
78

9+
#[cfg(not(feature = "codspeed"))]
810
mod generic;
911

1012
fn get_rxjs_sources() -> Vec<String> {

0 commit comments

Comments
 (0)