File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
turbopack/crates/turbo-persistence/src/compaction Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -279,8 +279,15 @@ mod tests {
279279 } )
280280 . collect :: < Vec < _ > > ( ) ;
281281
282+ let mut number_of_compactions = 0 ;
283+
282284 for _ in 0 ..100 {
283285 let coverage = total_coverage ( & containers, ( 0 , 10000 ) ) ;
286+ println ! (
287+ "{containers:#?} coverage: {}, items: {}" ,
288+ coverage,
289+ containers. len( )
290+ ) ;
284291
285292 if coverage > 10.0 {
286293 let config = CompactConfig {
@@ -289,8 +296,13 @@ mod tests {
289296 } ;
290297 let jobs = get_compaction_jobs ( & containers, & config) ;
291298 if !jobs. is_empty ( ) {
299+ println ! ( "{jobs:?}" ) ;
300+
292301 do_compact ( & mut containers, jobs) ;
302+ number_of_compactions += 1 ;
293303 }
304+ } else {
305+ println ! ( "No compaction needed" ) ;
294306 }
295307
296308 // Modify warm keys
@@ -303,6 +315,7 @@ mod tests {
303315 swap ( & mut warm_keys[ i] , & mut keys[ j] ) ;
304316 }
305317 }
318+ println ! ( "Number of compactions: {}" , number_of_compactions) ;
306319
307320 assert ! ( containers. len( ) < 40 ) ;
308321 let coverage = total_coverage ( & containers, ( 0 , 10000 ) ) ;
You can’t perform that action at this time.
0 commit comments