@@ -181,15 +181,15 @@ fn reserve_empty_page(c: &mut Criterion) {
181181 let mut group = c. benchmark_group ( "reserve_empty_page" ) ;
182182 group. throughput ( Throughput :: Bytes ( PAGE_DATA_SIZE as _ ) ) ;
183183 group. bench_function ( "leave_uninit" , |b| {
184- let pool = PagePool :: default ( ) ;
184+ let pool = PagePool :: new_for_test ( ) ;
185185 let mut pages = Pages :: default ( ) ;
186186 b. iter ( || {
187187 let _ = black_box ( pages. reserve_empty_page ( & pool, RESERVE_SIZE ) ) ;
188188 } ) ;
189189 } ) ;
190190
191191 let fill_with_zeros = |_, _, pages : & mut Pages | {
192- let pool = PagePool :: default ( ) ;
192+ let pool = PagePool :: new_for_test ( ) ;
193193 let page = pages. reserve_empty_page ( & pool, RESERVE_SIZE ) . unwrap ( ) ;
194194 let page = pages. get_page_mut ( page) ;
195195 unsafe { page. zero_data ( ) } ;
@@ -222,7 +222,7 @@ fn insert_one_page_fixed_len(c: &mut Criterion) {
222222 rows_per_page :: < R > ( ) as u64 * mem:: size_of :: < R > ( ) as u64 ,
223223 ) ) ;
224224 group. bench_function ( name, |b| {
225- let pool = PagePool :: default ( ) ;
225+ let pool = PagePool :: new_for_test ( ) ;
226226 let mut pages = Pages :: default ( ) ;
227227 // `0xa5` is the alternating bit pattern, which makes incorrect accesses obvious.
228228 insert_one_page_worth_fixed_len ( & pool, & mut pages, visitor, & R :: from_u64 ( 0xa5a5a5a5_a5a5a5a5 ) ) ;
@@ -283,7 +283,7 @@ fn delete_one_page_fixed_len(c: &mut Criterion) {
283283 } ;
284284 iter_time_with (
285285 b,
286- & mut ( Pages :: default ( ) , PagePool :: default ( ) ) ,
286+ & mut ( Pages :: default ( ) , PagePool :: new_for_test ( ) ) ,
287287 pre,
288288 |ptrs, _, ( pages, _) | {
289289 for ptr in ptrs {
@@ -315,7 +315,7 @@ fn retrieve_one_page_fixed_len(c: &mut Criterion) {
315315 group. throughput ( Throughput :: Bytes ( rows_per_page as u64 * mem:: size_of :: < R > ( ) as u64 ) ) ;
316316
317317 group. bench_function ( name, |b| {
318- let pool = PagePool :: default ( ) ;
318+ let pool = PagePool :: new_for_test ( ) ;
319319 let mut pages = Pages :: default ( ) ;
320320
321321 let ptrs = fill_page_with_fixed_len_collect_row_pointers (
@@ -367,7 +367,7 @@ fn insert_with_holes_fixed_len(c: &mut Criterion) {
367367 group. throughput ( Throughput :: Bytes ( num_to_delete_in_bytes as u64 ) ) ;
368368
369369 group. bench_function ( delete_ratio. to_string ( ) , |b| {
370- let pool = PagePool :: default ( ) ;
370+ let pool = PagePool :: new_for_test ( ) ;
371371 let mut pages = Pages :: default ( ) ;
372372
373373 let mut rng = StdRng :: seed_from_u64 ( 0xa5a5a5a5_a5a5a5a5 ) ;
@@ -437,7 +437,7 @@ fn copy_filter_fixed_len(c: &mut Criterion) {
437437 let val = R :: from_u64 ( 0xdeadbeef_0badbeef ) ;
438438 for keep_ratio in [ 0.1 , 0.25 , 0.5 , 0.75 , 0.9 , 1.0 ] {
439439 let visitor = & NullVarLenVisitor ;
440- let pool = PagePool :: default ( ) ;
440+ let pool = PagePool :: new_for_test ( ) ;
441441 let mut pages = Pages :: default ( ) ;
442442
443443 let num_pages = 16 ;
@@ -537,7 +537,7 @@ fn table_insert_one_row(c: &mut Criterion) {
537537 let val = black_box ( val. to_product ( ) ) ;
538538
539539 // Insert before benching to alloc and fault in a page.
540- let pool = PagePool :: default ( ) ;
540+ let pool = PagePool :: new_for_test ( ) ;
541541 let mut ctx = ( table, NullBlobStore ) ;
542542 let ptr = ctx. 0 . insert ( & pool, & mut ctx. 1 , & val) . unwrap ( ) . 1 . pointer ( ) ;
543543 let pre = |_, ( table, bs) : & mut ( Table , NullBlobStore ) | {
@@ -588,7 +588,7 @@ fn table_delete_one_row(c: &mut Criterion) {
588588 let val = val. to_product ( ) ;
589589
590590 // Insert before benching to alloc and fault in a page.
591- let mut ctx = ( table, NullBlobStore , PagePool :: default ( ) ) ;
591+ let mut ctx = ( table, NullBlobStore , PagePool :: new_for_test ( ) ) ;
592592 let insert = |_: u64 , ( table, bs, pool) : & mut ( Table , NullBlobStore , PagePool ) | {
593593 table. insert ( pool, bs, & val) . unwrap ( ) . 1 . pointer ( )
594594 } ;
@@ -637,7 +637,7 @@ fn table_extract_one_row(c: &mut Criterion) {
637637 let mut table = make_table_for_row_type :: < R > ( name) ;
638638 let val = val. to_product ( ) ;
639639
640- let pool = PagePool :: default ( ) ;
640+ let pool = PagePool :: new_for_test ( ) ;
641641 let mut blob_store = NullBlobStore ;
642642 let row = black_box ( table. insert ( & pool, & mut blob_store, & val) . unwrap ( ) . 1 ) ;
643643 group. bench_function ( name, |b| {
@@ -848,7 +848,7 @@ fn index_insert(c: &mut Criterion) {
848848 same_ratio : f64 ,
849849 ) {
850850 let make_row_move = & mut make_row;
851- let pool = PagePool :: default ( ) ;
851+ let pool = PagePool :: new_for_test ( ) ;
852852 let ( tbl, index_id, num_same, _) =
853853 make_table_with_same_ratio :: < R > ( & pool, make_row_move, num_rows, same_ratio, false ) ;
854854 let mut ctx = ( tbl, NullBlobStore , pool) ;
@@ -905,7 +905,7 @@ fn index_seek(c: &mut Criterion) {
905905 ) {
906906 let make_row_move = & mut make_row;
907907 let ( tbl, index_id, num_same, num_diff) =
908- make_table_with_same_ratio :: < R > ( & PagePool :: default ( ) , make_row_move, num_rows, same_ratio, unique) ;
908+ make_table_with_same_ratio :: < R > ( & PagePool :: new_for_test ( ) , make_row_move, num_rows, same_ratio, unique) ;
909909
910910 group. bench_with_input (
911911 bench_id_for_index ( name, num_rows, same_ratio, num_same, unique) ,
@@ -972,7 +972,7 @@ fn index_delete(c: &mut Criterion) {
972972 same_ratio : f64 ,
973973 ) {
974974 let make_row_move = & mut make_row;
975- let pool = PagePool :: default ( ) ;
975+ let pool = PagePool :: new_for_test ( ) ;
976976 let ( mut tbl, index_id, num_same, _) =
977977 make_table_with_same_ratio :: < R > ( & pool, make_row_move, num_rows, same_ratio, false ) ;
978978
0 commit comments