fix: fix availableParallelism() usage for pool min size
[poolifier.git] / benchmarks / benchmarks-utils.mjs
index 225143f1a1b4d1d483342ad19903e0f4affaec07..56767597b41ff848012c31d9e1f1a92d6415e8e8 100644 (file)
@@ -133,14 +133,14 @@ export const buildPool = (workerType, poolType, poolSize, poolOptions) => {
       switch (workerType) {
         case WorkerTypes.thread:
           return new DynamicThreadPool(
-            poolSize / 2,
+            Math.floor(poolSize / 2),
             poolSize * 3,
             './benchmarks/internal/thread-worker.mjs',
             poolOptions
           )
         case WorkerTypes.cluster:
           return new DynamicClusterPool(
-            poolSize / 2,
+            Math.floor(poolSize / 2),
             poolSize * 3,
             './benchmarks/internal/cluster-worker.mjs',
             poolOptions