'./benchmarks/internal/cluster/worker.js'
)
-const fixedPoolLessRecentlyUsed = new FixedClusterPool(
+const fixedPoolLessUsed = new FixedClusterPool(
size,
'./benchmarks/internal/cluster/worker.js',
- { workerChoiceStrategy: WorkerChoiceStrategies.LESS_RECENTLY_USED }
+ { workerChoiceStrategy: WorkerChoiceStrategies.LESS_USED }
+)
+
+const fixedPoolLessBusy = new FixedClusterPool(
+ size,
+ './benchmarks/internal/cluster/worker.js',
+ { workerChoiceStrategy: WorkerChoiceStrategies.LESS_BUSY }
)
const fixedPoolWeightedRoundRobin = new FixedClusterPool(
return runPoolifierTest(fixedPool, { tasks, workerData })
}
-async function fixedClusterTestLessRecentlyUsed (
+async function fixedClusterTestLessUsed (
+ { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
+) {
+ return runPoolifierTest(fixedPoolLessUsed, { tasks, workerData })
+}
+
+async function fixedClusterTestLessBusy (
{ tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
) {
- return runPoolifierTest(fixedPoolLessRecentlyUsed, { tasks, workerData })
+ return runPoolifierTest(fixedPoolLessBusy, { tasks, workerData })
}
async function fixedClusterTestWeightedRoundRobin (
module.exports = {
fixedClusterTest,
- fixedClusterTestLessRecentlyUsed,
+ fixedClusterTestLessUsed,
+ fixedClusterTestLessBusy,
fixedClusterTestWeightedRoundRobin,
fixedClusterTestFairShare
}