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 @@ -21,12 +21,12 @@ export const setupCore = () => {
21
21
mongoMeasurement = new MongoMeasurement ( ) ;
22
22
} ;
23
23
24
- export const teardownCore = ( ) => {
24
+ export const teardownCore = async ( ) => {
25
25
linuxPerf . stop ( ) ;
26
- const aggregate = mongoMeasurement . terminate ( ) ;
26
+ const aggregate = await mongoMeasurement . terminate ( ) ;
27
27
if ( aggregate !== undefined ) {
28
28
console . log ( `[CodSpeed] Mongo Aggregate: ${ aggregate } ` ) ;
29
- return ;
29
+ return aggregate ;
30
30
}
31
31
console . log ( `[CodSpeed] Mongo Aggregate: no aggregate` ) ;
32
32
} ;
Original file line number Diff line number Diff line change @@ -82,7 +82,10 @@ export function withCodSpeed(bench: Bench): Bench {
82
82
// print results
83
83
console . log ( ` ✔ Measured ${ uri } ` ) ;
84
84
}
85
- teardownCore ( ) ;
85
+ const aggregate = await teardownCore ( ) ;
86
+ console . log (
87
+ `[CodSpeed] Mongo Aggregate: ${ JSON . stringify ( aggregate , null , 2 ) } `
88
+ ) ;
86
89
console . log ( `[CodSpeed] Done running ${ bench . tasks . length } benches.` ) ;
87
90
return bench . tasks ;
88
91
} ;
You can’t perform that action at this time.
0 commit comments