{ workerChoiceStrategy: WorkerChoiceStrategies.LESS_USED }
)
+const fixedPoolLessBusy = new FixedThreadPool(
+ size,
+ './benchmarks/internal/thread/worker.js',
+ { workerChoiceStrategy: WorkerChoiceStrategies.LESS_BUSY }
+)
+
const fixedPoolWeightedRoundRobin = new FixedThreadPool(
size,
'./benchmarks/internal/thread/worker.js',
return runPoolifierTest(fixedPoolLessUsed, { tasks, workerData })
}
+async function fixedThreadTestLessBusy (
+ { tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
+) {
+ return runPoolifierTest(fixedPoolLessBusy, { tasks, workerData })
+}
+
async function fixedThreadTestWeightedRoundRobin (
{ tasks, workerData } = { tasks: numberOfTasks, workerData: { proof: 'ok' } }
) {
module.exports = {
fixedThreadTest,
fixedThreadTestLessUsed,
+ fixedThreadTestLessBusy,
fixedThreadTestWeightedRoundRobin,
fixedThreadTestFairShare
}