fix: properly size the pools in benchmarking code
[poolifier.git] / benchmarks / versus-external-pools / dynamic-tinypool.mjs
index a28de9b59f7e8e1e03f6de4146a768b4a91c3ff6..acb8627f4f1e2f4ca1592d8aaa29b9f21a6d6160 100644 (file)
@@ -11,8 +11,8 @@ const data = {
 
 const tinypool = new Tinypool({
   filename: './workers/tinypool/function-to-bench-worker.mjs',
-  minThreads: size,
-  maxThreads: size * 3,
+  minThreads: Math.floor(size / 2),
+  maxThreads: size,
   idleTimeout: 60000 // this is the same as poolifier default
 })