perf: align benchmark v8 memory tunables
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 26 Nov 2023 21:14:49 +0000 (22:14 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 26 Nov 2023 21:14:49 +0000 (22:14 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
benchmarks/benchmarks-utils.js
benchmarks/internal/bench.mjs
package.json

index d779f8a75efb2c1b8eaa1287c602da1d33dc79e5..8f5468bbf624780297cdf071f6e6cbcf9a1a8759 100644 (file)
@@ -153,10 +153,9 @@ const runPoolifierPoolBenchmark = async (
             'Fastest is ' +
               LIST_FORMATTER.format(this.filter('fastest').map('name'))
           )
-          // FIXME: destroy() hangs
           const destroyTimeout = setTimeout(() => {
+            console.error('Pool destroy timeout reached (30s)')
             resolve()
-            clearTimeout(destroyTimeout)
           }, 30000)
           pool
             .destroy()
index adff36153241f7843f702547237280a509bb7326..5ea11e18414b6f9c474a32ec92c0eba3d0538cb1 100644 (file)
@@ -1,3 +1,4 @@
+import { exit } from 'node:process'
 import {
   PoolTypes,
   WorkerTypes,
@@ -60,3 +61,5 @@ await runPoolifierPoolBenchmark(
     workerData
   }
 )
+
+exit()
index 62477b59027efd06c4cacfbd285b8f7b94844c7f..67abe6856a9da6b3c7ea5b75bb30497dd5858dc7 100644 (file)
@@ -19,9 +19,9 @@
     "build:prod": "rollup --config",
     "build:typedoc": "rollup --config --environment DOCUMENTATION,BUILD:development",
     "build:analyze": "rollup --config --environment ANALYZE,BUILD:development",
-    "benchmark": "pnpm build && node --max-old-space-size=4096 --enable-source-maps benchmarks/internal/bench.mjs",
-    "benchmark:prod": "pnpm build:prod && node --max-old-space-size=4096 --enable-source-maps benchmarks/internal/bench.mjs",
-    "benchmark:debug": "pnpm build && node --max-old-space-size=4096 --enable-source-maps --inspect benchmarks/internal/bench.mjs",
+    "benchmark": "pnpm build && node --max-old-space-size=8192 --enable-source-maps benchmarks/internal/bench.mjs",
+    "benchmark:prod": "pnpm build:prod && node --max-old-space-size=8192 --enable-source-maps benchmarks/internal/bench.mjs",
+    "benchmark:debug": "pnpm build && node --max-old-space-size=8192 --enable-source-maps --inspect benchmarks/internal/bench.mjs",
     "test": "pnpm build --environment SOURCEMAP:false && c8 mocha 'tests/**/*.test.mjs'",
     "test:debug": "pnpm build && mocha --no-parallel --inspect 'tests/**/*.test.mjs'",
     "coverage": "c8 report --reporter=lcov",