Skip to content

Commit

Permalink
chore: remove initOptimizations function
Browse files Browse the repository at this point in the history
The flag it was setting is already passed
  • Loading branch information
adriencaccia committed Dec 11, 2024
1 parent 60fc89b commit 7351c4e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { checkV8Flags } from "./introspection";
import { MongoMeasurement } from "./mongoMeasurement";
import native_core from "./native_core";
import { initOptimization } from "./optimization";

declare const __VERSION__: string;

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

export const setupCore = () => {
initOptimization();
native_core.Measurement.stopInstrumentation(
`Metadata: codspeed-node ${__VERSION__}`
);
Expand Down
5 changes: 0 additions & 5 deletions packages/core/src/optimization.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
export const initOptimization = () => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
require("v8").setFlagsFromString("--allow-natives-syntax");
};

export const optimizeFunction = async (fn: CallableFunction) => {
// Source: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#optimization-killers
// a total of 7 calls seems to be the sweet spot
Expand Down

0 comments on commit 7351c4e

Please sign in to comment.