Skip to content

Commit dac6ba0

Browse files
committed
Use --quick
1 parent bf826ab commit dac6ba0

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ jobs:
947947
tool: cargo-codspeed
948948

949949
- name: "Build benchmarks"
950-
run: cargo codspeed build --features "codspeed,walltime" --no-default-features -p ruff_benchmark
950+
run: cargo codspeed build --features "codspeed,walltime" --no-default-features -p ruff_benchmark -- --quick
951951

952952
- name: "Run benchmarks"
953953
uses: CodSpeedHQ/action@0010eb0ca6e89b80c88e8edaaa07cfe5f3e6664d # v3.5.0

crates/ruff_benchmark/benches/ty_walltime.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ fn bench_project(
5757
);
5858
}
5959

60-
setup_rayon();
61-
6260
let setup_project = project.setup().expect("Failed to setup project");
6361

6462
let root = SystemPathBuf::from_path_buf(setup_project.path.clone()).unwrap();
@@ -198,21 +196,5 @@ fn sympy(criterion: &mut Criterion) {
198196
bench_project(project, criterion, 13000, Size::Large);
199197
}
200198

201-
static RAYON_INITIALIZED: std::sync::Once = std::sync::Once::new();
202-
203-
fn setup_rayon() {
204-
// Initialize the rayon thread pool outside the benchmark because it has a significant cost.
205-
// We limit the thread pool to only one (the current thread) because we're focused on
206-
// where ty spends time and less about how well the code runs concurrently.
207-
// We might want to add a benchmark focusing on concurrency to detect congestion in the future.
208-
RAYON_INITIALIZED.call_once(|| {
209-
ThreadPoolBuilder::new()
210-
.num_threads(1)
211-
.use_current_thread()
212-
.build_global()
213-
.unwrap();
214-
});
215-
}
216-
217199
criterion_group!(project, colour_science, freqtrade, pandas, pydantic, sympy);
218200
criterion_main!(project);

0 commit comments

Comments
 (0)