fix: properly size the pools in benchmarking code
[poolifier.git] / benchmarks / versus-external-pools / dynamic-piscina.mjs
index 6fcc6793869f38d236c9f956962ed871376fccb6..a1e425f8e95f3a19c8cc5d776cb225fd11f9b200 100644 (file)
@@ -11,8 +11,8 @@ const data = {
 
 const piscina = new Piscina({
   filename: './workers/piscina/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
 })