File tree Expand file tree Collapse file tree
packages/tinybench-plugin/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import {
22 calculateQuantiles ,
3+ InstrumentHooks ,
34 mongoMeasurement ,
45 msToNs ,
56 msToS ,
@@ -17,6 +18,7 @@ export function runWalltimeBench(bench: Bench, rootCallingFile: string): void {
1718 console . log (
1819 `[CodSpeed] running with @codspeed/tinybench v${ __VERSION__ } (walltime mode)`
1920 ) ;
21+ InstrumentHooks . setIntegration ( "codspeed-node" , __VERSION__ ) ;
2022
2123 // Store the original run method before we override it
2224 const originalRun = bench . run ;
@@ -40,7 +42,9 @@ export function runWalltimeBench(bench: Bench, rootCallingFile: string): void {
4042 await task . warmup ( ) ;
4143 }
4244 await mongoMeasurement . start ( uri ) ;
45+ InstrumentHooks . startBenchmark ( ) ;
4346 const taskResult = await task . run ( ) ;
47+ InstrumentHooks . stopBenchmark ( ) ;
4448 await mongoMeasurement . stop ( uri ) ;
4549 results . push ( taskResult ) ;
4650
@@ -67,8 +71,8 @@ export function runWalltimeBench(bench: Bench, rootCallingFile: string): void {
6771 } ;
6872
6973 benchmarks . push ( benchmark ) ;
70-
7174 console . log ( ` ✔ Collected walltime data for ${ uri } ` ) ;
75+ InstrumentHooks . setExecutedBenchmark ( process . pid , uri ) ;
7276 } else {
7377 console . warn ( ` ⚠ No result data available for ${ uri } ` ) ;
7478 }
You can’t perform that action at this time.
0 commit comments