Skip to content

Commit 09eff8c

Browse files
committed
ci: Lower the amount of events we benchmark against on the CI
1 parent 7ee546a commit 09eff8c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

benchmarks/benches/linked_chunk.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ enum Operation {
2020
PushGapBack(Gap),
2121
}
2222

23+
#[cfg(not(feature = "codspeed"))]
24+
const NUMBER_OF_EVENTS: &[u64] = &[10, 100, 1000, 10_000, 100_000];
25+
#[cfg(feature = "codspeed")]
26+
const NUMBER_OF_EVENTS: &[u64] = &[10, 100, 1000];
27+
2328
fn writing(c: &mut Criterion) {
2429
// Create a new asynchronous runtime.
2530
let runtime = Builder::new_multi_thread()
@@ -35,7 +40,7 @@ fn writing(c: &mut Criterion) {
3540
let mut group = c.benchmark_group("writing");
3641
group.sample_size(10).measurement_time(Duration::from_secs(30));
3742

38-
for number_of_events in [10, 100, 1000, 10_000, 100_000] {
43+
for &number_of_events in NUMBER_OF_EVENTS {
3944
let sqlite_temp_dir = tempdir().unwrap();
4045

4146
// Declare new stores for this set of events.
@@ -152,7 +157,7 @@ fn reading(c: &mut Criterion) {
152157
let mut group = c.benchmark_group("reading");
153158
group.sample_size(10);
154159

155-
for num_events in [10, 100, 1000, 10_000, 100_000] {
160+
for &num_events in NUMBER_OF_EVENTS {
156161
let sqlite_temp_dir = tempdir().unwrap();
157162

158163
// Declare new stores for this set of events.

0 commit comments

Comments
 (0)