X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fcluster%2Fdynamic.js;h=3c00c50b8c7af84ebfc45f5f6cb4a2c814104c41;hb=59497fa9684605a29f8d0757d36825c26f2d2bec;hp=7ad9dd282d5e27a7afcdcd10e9a0d4c860e4e75c;hpb=ff5e76e152be8540cba8118bb4e2b9da314dfff5;p=poolifier.git diff --git a/benchmarks/internal/cluster/dynamic.js b/benchmarks/internal/cluster/dynamic.js index 7ad9dd28..3c00c50b 100644 --- a/benchmarks/internal/cluster/dynamic.js +++ b/benchmarks/internal/cluster/dynamic.js @@ -2,9 +2,10 @@ const { DynamicClusterPool, WorkerChoiceStrategies } = require('../../../lib/index') -const { runTest } = require('../benchmark-utils') +const { runPoolifierTest } = require('../benchmark-utils') const size = 30 +const numberOfTasks = 1 const dynamicPool = new DynamicClusterPool( size / 2, @@ -20,15 +21,15 @@ const dynamicPoolLessRecentlyUsed = new DynamicClusterPool( ) async function dynamicClusterTest ( - { tasks, workerData } = { tasks: 1, workerData: { proof: 'ok' } } + { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } } ) { - return runTest(dynamicPool, { tasks, workerData }) + return runPoolifierTest(dynamicPool, { tasks, workerData }) } async function dynamicClusterTestLessRecentlyUsed ( - { tasks, workerData } = { tasks: 1, workerData: { proof: 'ok' } } + { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } } ) { - return runTest(dynamicPoolLessRecentlyUsed, { tasks, workerData }) + return runPoolifierTest(dynamicPoolLessRecentlyUsed, { tasks, workerData }) } module.exports = {