File tree Expand file tree Collapse file tree 4 files changed +4
-30
lines changed Expand file tree Collapse file tree 4 files changed +4
-30
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,8 @@ export const setupCore = () => {
21
21
mongoMeasurement = new MongoMeasurement ( ) ;
22
22
} ;
23
23
24
- export const teardownCore = async ( ) => {
24
+ export const teardownCore = ( ) => {
25
25
linuxPerf . stop ( ) ;
26
- const aggregate = await mongoMeasurement . terminate ( ) ;
27
- if ( aggregate !== undefined ) {
28
- console . log ( `[CodSpeed] Mongo Aggregate: ${ aggregate } ` ) ;
29
- return aggregate ;
30
- }
31
- console . log ( `[CodSpeed] Mongo Aggregate: no aggregate` ) ;
32
26
} ;
33
27
34
28
export { getV8Flags , tryIntrospect } from "./introspection" ;
Original file line number Diff line number Diff line change 1
- import { ApiError , MongoTracer } from "./generated/openapi" ;
1
+ import { MongoTracer } from "./generated/openapi" ;
2
2
3
3
export class MongoMeasurement {
4
4
private tracerClient : MongoTracer | undefined ;
@@ -39,18 +39,4 @@ export class MongoMeasurement {
39
39
} ) ;
40
40
}
41
41
}
42
-
43
- public async terminate ( ) {
44
- if ( this . tracerClient !== undefined ) {
45
- try {
46
- return await this . tracerClient . instrumentation . terminate ( ) ;
47
- } catch ( e ) {
48
- // TODO handle terminate killing the server instead of returning a response first
49
- if ( e instanceof ApiError ) {
50
- console . error ( "Terminate failed with error" ) ;
51
- console . log ( e . body ) ;
52
- }
53
- }
54
- }
55
- }
56
42
}
Original file line number Diff line number Diff line change @@ -82,10 +82,7 @@ export function withCodSpeed(bench: Bench): Bench {
82
82
// print results
83
83
console . log ( ` ✔ Measured ${ uri } ` ) ;
84
84
}
85
- const aggregate = await teardownCore ( ) ;
86
- console . log (
87
- `[CodSpeed] Mongo Aggregate: ${ JSON . stringify ( aggregate , null , 2 ) } `
88
- ) ;
85
+ teardownCore ( ) ;
89
86
console . log ( `[CodSpeed] Done running ${ bench . tasks . length } benches.` ) ;
90
87
return bench . tasks ;
91
88
} ;
Original file line number Diff line number Diff line change @@ -85,10 +85,7 @@ class CodSpeedRunner extends NodeBenchmarkRunner {
85
85
await runBenchmarkSuite ( suite ) ;
86
86
logCodSpeed ( `running suite ${ suite . name } done` ) ;
87
87
88
- const mongoAggregate = await teardownCore ( ) ;
89
- logCodSpeed (
90
- `[CodSpeed] Mongo Aggregate: ${ JSON . stringify ( mongoAggregate , null , 2 ) } `
91
- ) ;
88
+ teardownCore ( ) ;
92
89
}
93
90
}
94
91
You can’t perform that action at this time.
0 commit comments