Fix strategy handling in pool options (#259)
[poolifier.git] / benchmarks / internal / thread / fixed.js
index cd7fdebfdceeb57881be02299447ef3d3533f89d..617aa7e5950952c241c2c98a091e2cf8965553b6 100644 (file)
@@ -5,6 +5,7 @@ const {
 const { runPoolifierTest } = require('../benchmark-utils')
 
 const size = 30
+const numberOfTasks = 1
 
 const fixedPool = new FixedThreadPool(
   size,
@@ -18,13 +19,13 @@ const fixedPoolLessRecentlyUsed = new FixedThreadPool(
 )
 
 async function fixedThreadTest (
-  { tasks, workerData } = { tasks: 1, workerData: { proof: 'ok' } }
+  { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
 ) {
   return runPoolifierTest(fixedPool, { tasks, workerData })
 }
 
 async function fixedThreadTestLessRecentlyUsed (
-  { tasks, workerData } = { tasks: 1, workerData: { proof: 'ok' } }
+  { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
 ) {
   return runPoolifierTest(fixedPoolLessRecentlyUsed, { tasks, workerData })
 }