@@ -20,6 +20,11 @@ enum Operation {
20
20
PushGapBack ( Gap ) ,
21
21
}
22
22
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
+
23
28
fn writing ( c : & mut Criterion ) {
24
29
// Create a new asynchronous runtime.
25
30
let runtime = Builder :: new_multi_thread ( )
@@ -35,7 +40,7 @@ fn writing(c: &mut Criterion) {
35
40
let mut group = c. benchmark_group ( "writing" ) ;
36
41
group. sample_size ( 10 ) . measurement_time ( Duration :: from_secs ( 30 ) ) ;
37
42
38
- for number_of_events in [ 10 , 100 , 1000 , 10_000 , 100_000 ] {
43
+ for & number_of_events in NUMBER_OF_EVENTS {
39
44
let sqlite_temp_dir = tempdir ( ) . unwrap ( ) ;
40
45
41
46
// Declare new stores for this set of events.
@@ -152,7 +157,7 @@ fn reading(c: &mut Criterion) {
152
157
let mut group = c. benchmark_group ( "reading" ) ;
153
158
group. sample_size ( 10 ) ;
154
159
155
- for num_events in [ 10 , 100 , 1000 , 10_000 , 100_000 ] {
160
+ for & num_events in NUMBER_OF_EVENTS {
156
161
let sqlite_temp_dir = tempdir ( ) . unwrap ( ) ;
157
162
158
163
// Declare new stores for this set of events.
0 commit comments