4 } = require('../../../lib/index')
5 const { runPoolifierTest
} = require('../benchmark-utils')
9 const dynamicPool
= new DynamicClusterPool(
12 './benchmarks/internal/cluster/worker.js'
15 const dynamicPoolLessRecentlyUsed
= new DynamicClusterPool(
18 './benchmarks/internal/cluster/worker.js',
19 { workerChoiceStrategy
: WorkerChoiceStrategies
.LESS_RECENTLY_USED
}
22 async
function dynamicClusterTest (
23 { tasks
, workerData
} = { tasks
: 1, workerData
: { proof
: 'ok' } }
25 return runPoolifierTest(dynamicPool
, { tasks
, workerData
})
28 async
function dynamicClusterTestLessRecentlyUsed (
29 { tasks
, workerData
} = { tasks
: 1, workerData
: { proof
: 'ok' } }
31 return runPoolifierTest(dynamicPoolLessRecentlyUsed
, { tasks
, workerData
})
36 dynamicClusterTestLessRecentlyUsed