diff --git a/patches/@codspeed+core+3.1.0.patch b/patches/@codspeed+core+3.1.0.patch deleted file mode 100644 index 34dbbde2..00000000 --- a/patches/@codspeed+core+3.1.0.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/node_modules/@codspeed/core/dist/index.cjs.js b/node_modules/@codspeed/core/dist/index.cjs.js -index 1c40cda..4a5d588 100644 ---- a/node_modules/@codspeed/core/dist/index.cjs.js -+++ b/node_modules/@codspeed/core/dist/index.cjs.js -@@ -26,7 +26,10 @@ const getV8Flags = () => { - "--no-opt", - "--predictable", - "--predictable-gc-schedule", -- "--interpreted-frames-native-stack" -+ "--interpreted-frames-native-stack", -+ // "--jitless", -+ '--no-concurrent-sweeping', -+ '--max-old-space-size=4096', - ]; - if (nodeVersionMajor < 18) { - flags.push("--no-randomize-hashes"); \ No newline at end of file diff --git a/patches/@codspeed+core+3.1.1.patch b/patches/@codspeed+core+3.1.1.patch new file mode 100644 index 00000000..d706f9f9 --- /dev/null +++ b/patches/@codspeed+core+3.1.1.patch @@ -0,0 +1,38 @@ +diff --git a/node_modules/@codspeed/core/dist/index.cjs.js b/node_modules/@codspeed/core/dist/index.cjs.js +index 5087584..64fa54a 100644 +--- a/node_modules/@codspeed/core/dist/index.cjs.js ++++ b/node_modules/@codspeed/core/dist/index.cjs.js +@@ -25,8 +25,12 @@ const getV8Flags = () => { + "--random-seed=1", + "--no-opt", + "--predictable", ++ "--expose-gc", + "--predictable-gc-schedule", +- "--interpreted-frames-native-stack" ++ "--interpreted-frames-native-stack", ++ // "--jitless", ++ '--no-concurrent-sweeping', ++ '--max-old-space-size=4096', + ]; + if (nodeVersionMajor < 18) { + flags.push("--no-randomize-hashes"); +@@ -18861,6 +18865,9 @@ const optimizeFunction = async (fn) => { + } + await fn(); + await fn(); ++ await fn(); ++ await fn(); ++ await fn(); + eval("%OptimizeFunctionOnNextCall(fn)"); + await fn(); + }; +@@ -18871,6 +18878,9 @@ const optimizeFunctionSync = (fn) => { + } + fn(); + fn(); ++ fn(); ++ fn(); ++ fn(); + eval("%OptimizeFunctionOnNextCall(fn)"); + fn(); + }; diff --git a/patches/@codspeed+vitest-plugin+3.1.1.patch b/patches/@codspeed+vitest-plugin+3.1.1.patch new file mode 100644 index 00000000..6c8ec296 --- /dev/null +++ b/patches/@codspeed+vitest-plugin+3.1.1.patch @@ -0,0 +1,12 @@ +diff --git a/node_modules/@codspeed/vitest-plugin/dist/runner.mjs b/node_modules/@codspeed/vitest-plugin/dist/runner.mjs +index f4c6c95..ee26264 100644 +--- a/node_modules/@codspeed/vitest-plugin/dist/runner.mjs ++++ b/node_modules/@codspeed/vitest-plugin/dist/runner.mjs +@@ -32,6 +32,7 @@ async function runBench(benchmark, currentSuiteName) { + throw e; + } + } ++ global.gc(); + await callSuiteHook(benchmark.suite, benchmark, "afterEach"); + await callSuiteHook(benchmark.suite, benchmark, "beforeEach"); + await mongoMeasurement.start(uri);