File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
packages/benchmark.js/src Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ function withCodSpeedSuite(suite: Benchmark.Suite): Benchmark.Suite {
58
58
} ;
59
59
return suite ;
60
60
}
61
+ initCore ( ) ;
61
62
const callingFile = getCallingFile ( ) ;
62
63
// eslint-disable-next-line @typescript-eslint/no-unused-vars
63
64
suite . run = function ( options ?: Benchmark . Options ) : Benchmark . Suite {
@@ -73,6 +74,8 @@ function withCodSpeedSuite(suite: Benchmark.Suite): Benchmark.Suite {
73
74
for ( let i = 0 ; i < benches . length ; i ++ ) {
74
75
const bench = benches [ i ] ;
75
76
const uri = baseUri + "::" + ( bench . name ?? `unknown_${ i } ` ) ;
77
+ const fn = bench . fn as CallableFunction ;
78
+ optimizeFunctionSync ( fn ) ;
76
79
measurement . startInstrumentation ( ) ;
77
80
( bench . fn as CallableFunction ) ( ) ;
78
81
measurement . stopInstrumentation ( uri ) ;
You can’t perform that action at this time.
0 commit comments