File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ export const setupCore = () => {
2222 mongoMeasurement = new MongoMeasurement ( ) ;
2323} ;
2424
25- export const teardownCore = ( ) => {
25+ export const teardownCore = async ( ) => {
2626 linuxPerf . stop ( ) ;
27- const aggregate = mongoMeasurement . terminate ( ) ;
27+ const aggregate = await mongoMeasurement . terminate ( ) ;
2828 if ( aggregate !== undefined ) {
2929 console . log ( `[CodSpeed] Mongo Aggregate: ${ aggregate } ` ) ;
30- return ;
30+ return aggregate ;
3131 }
3232 console . log ( `[CodSpeed] Mongo Aggregate: no aggregate` ) ;
3333} ;
Original file line number Diff line number Diff line change @@ -81,7 +81,10 @@ export function withCodSpeed(bench: Bench): Bench {
8181 // print results
8282 console . log ( ` ✔ Measured ${ uri } ` ) ;
8383 }
84- teardownCore ( ) ;
84+ const aggregate = await teardownCore ( ) ;
85+ console . log (
86+ `[CodSpeed] Mongo Aggregate: ${ JSON . stringify ( aggregate , null , 2 ) } `
87+ ) ;
8588 console . log ( `[CodSpeed] Done running ${ bench . tasks . length } benches.` ) ;
8689 return bench . tasks ;
8790 } ;
You can’t perform that action at this time.
0 commit comments