Fix strategy handling in pool options (#259)
[poolifier.git] / benchmarks / internal / cluster / dynamic.js
index 6838e07a9cad0e882f62c68d8d890f5ec4a003ea..3c00c50b8c7af84ebfc45f5f6cb4a2c814104c41 100644 (file)
@@ -5,6 +5,7 @@ const {
 const { runPoolifierTest } = require('../benchmark-utils')
 
 const size = 30
+const numberOfTasks = 1
 
 const dynamicPool = new DynamicClusterPool(
   size / 2,
@@ -20,13 +21,13 @@ const dynamicPoolLessRecentlyUsed = new DynamicClusterPool(
 )
 
 async function dynamicClusterTest (
-  { tasks, workerData } = { tasks: 1, workerData: { proof: 'ok' } }
+  { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
 ) {
   return runPoolifierTest(dynamicPool, { tasks, workerData })
 }
 
 async function dynamicClusterTestLessRecentlyUsed (
-  { tasks, workerData } = { tasks: 1, workerData: { proof: 'ok' } }
+  { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
 ) {
   return runPoolifierTest(dynamicPoolLessRecentlyUsed, { tasks, workerData })
 }