File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -918,6 +918,10 @@ class Benchmark {
918918 if ( this . isDone )
919919 throw new Error ( `Cannot run Benchmark ${ this . name } twice` ) ;
920920 this . _state = BenchmarkState . PREPARE ;
921+
922+ if ( JetStreamParams . forceGC )
923+ globalThis ?. gc ( ) ;
924+
921925 const scripts = isInBrowser ? new BrowserScripts ( this . preloads ) : new ShellScripts ( this . preloads ) ;
922926
923927 if ( ! ! this . plan . deterministicRandom )
@@ -987,9 +991,6 @@ class Benchmark {
987991 magicFrame . contentDocument . close ( ) ;
988992 else if ( isD8 )
989993 Realm . dispose ( magicFrame ) ;
990-
991- if ( JetStreamParams . forceGC )
992- globalThis ?. gc ( ) ;
993994 }
994995
995996 async doLoadBlob ( resource ) {
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ const CLI_PARAMS = {
8282 param : "customPostIterationCode" ,
8383 } ,
8484 "force-gc" : {
85- help : "Force garbage collection after each benchmark run, requires engine support." ,
85+ help : "Force garbage collection before each benchmark run, requires engine support." ,
8686 param : "forceGC" ,
8787 } ,
8888} ;
You can’t perform that action at this time.
0 commit comments