Skip to content

Commit 7351c4e

Browse files
committed
chore: remove initOptimizations function
The flag it was setting is already passed
1 parent 60fc89b commit 7351c4e

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

packages/core/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { checkV8Flags } from "./introspection";
22
import { MongoMeasurement } from "./mongoMeasurement";
33
import native_core from "./native_core";
4-
import { initOptimization } from "./optimization";
54

65
declare const __VERSION__: string;
76

@@ -12,7 +11,6 @@ export const isBound = native_core.isBound;
1211
export const mongoMeasurement = new MongoMeasurement();
1312

1413
export const setupCore = () => {
15-
initOptimization();
1614
native_core.Measurement.stopInstrumentation(
1715
`Metadata: codspeed-node ${__VERSION__}`
1816
);

packages/core/src/optimization.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
export const initOptimization = () => {
2-
// eslint-disable-next-line @typescript-eslint/no-var-requires
3-
require("v8").setFlagsFromString("--allow-natives-syntax");
4-
};
5-
61
export const optimizeFunction = async (fn: CallableFunction) => {
72
// Source: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#optimization-killers
83
// a total of 7 calls seems to be the sweet spot

0 commit comments

Comments
 (0)