We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 008b810 commit fb7909dCopy full SHA for fb7909d
packages/core/src/index.ts
@@ -23,6 +23,12 @@ export const setupCore = () => {
23
24
export const teardownCore = () => {
25
linuxPerf.stop();
26
+ const aggregate = mongoMeasurement.terminate();
27
+ if (aggregate !== undefined) {
28
+ console.log(`[CodSpeed] Mongo Aggregate: ${aggregate}`);
29
+ return;
30
+ }
31
+ console.log(`[CodSpeed] Mongo Aggregate: no aggregate`);
32
};
33
34
export { getV8Flags, tryIntrospect } from "./introspection";
packages/core/src/mongoMeasurement.ts
@@ -39,4 +39,10 @@ export class MongoMeasurement {
39
});
40
}
41
42
+
43
+ public async terminate() {
44
+ if (this.tracerClient !== undefined) {
45
+ return await this.tracerClient.instrumentation.terminate();
46
47
48
0 commit comments