From: Jérôme Benoit Date: Sun, 26 Nov 2023 21:14:49 +0000 (+0100) Subject: perf: align benchmark v8 memory tunables X-Git-Tag: v3.0.10~20 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=00a2ffdbeeb43b5f0f04b759b1173cbe1c751a5d;p=poolifier.git perf: align benchmark v8 memory tunables Signed-off-by: Jérôme Benoit --- diff --git a/benchmarks/benchmarks-utils.js b/benchmarks/benchmarks-utils.js index d779f8a7..8f5468bb 100644 --- a/benchmarks/benchmarks-utils.js +++ b/benchmarks/benchmarks-utils.js @@ -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() diff --git a/benchmarks/internal/bench.mjs b/benchmarks/internal/bench.mjs index adff3615..5ea11e18 100644 --- a/benchmarks/internal/bench.mjs +++ b/benchmarks/internal/bench.mjs @@ -1,3 +1,4 @@ +import { exit } from 'node:process' import { PoolTypes, WorkerTypes, @@ -60,3 +61,5 @@ await runPoolifierPoolBenchmark( workerData } ) + +exit() diff --git a/package.json b/package.json index 62477b59..67abe685 100644 --- a/package.json +++ b/package.json @@ -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",