+const dynamicThreadPoolWeightedRoundRobin = buildPool(
+ WorkerTypes.THREAD,
+ PoolTypes.DYNAMIC,
+ poolSize,
+ workerChoiceStrategyWeightedRoundRobinPoolOption
+)
+
+const dynamicThreadPoolFairShare = buildPool(
+ WorkerTypes.THREAD,
+ PoolTypes.DYNAMIC,
+ poolSize,
+ workerChoiceStrategyFairSharePoolOption
+)
+
+const fixedClusterPoolRoundRobin = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.FIXED,
+ poolSize,
+ workerChoiceStrategyRoundRobinPoolOption
+)
+
+const fixedClusterPoolRoundRobinTasksQueue = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.FIXED,
+ poolSize,
+ { ...workerChoiceStrategyRoundRobinPoolOption, ...tasksQueuePoolOption }
+)
+
+const fixedClusterPoolLessUsed = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.FIXED,
+ poolSize,
+ workerChoiceStrategyLessUsedPoolOption
+)
+
+const fixedClusterPoolLessBusy = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.FIXED,
+ poolSize,
+ workerChoiceStrategyLessBusyPoolOption
+)
+
+const fixedClusterPoolWeightedRoundRobin = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.FIXED,
+ poolSize,
+ workerChoiceStrategyWeightedRoundRobinPoolOption
+)
+
+const fixedClusterPoolFairShare = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.FIXED,
+ poolSize,
+ workerChoiceStrategyFairSharePoolOption
+)
+
+const fixedClusterPoolFairShareTaskQueue = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.FIXED,
+ poolSize,
+ { ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption }
+)
+
+const dynamicClusterPoolRoundRobin = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.DYNAMIC,
+ poolSize,
+ workerChoiceStrategyRoundRobinPoolOption
+)
+
+const dynamicClusterPoolLessUsed = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.DYNAMIC,
+ poolSize,
+ workerChoiceStrategyLessUsedPoolOption
+)
+
+const dynamicClusterPoolLessBusy = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.DYNAMIC,
+ poolSize,
+ workerChoiceStrategyLessBusyPoolOption
+)
+
+const dynamicClusterPoolWeightedRoundRobin = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.DYNAMIC,
+ poolSize,
+ workerChoiceStrategyWeightedRoundRobinPoolOption
+)
+
+const dynamicClusterPoolFairShare = buildPool(
+ WorkerTypes.CLUSTER,
+ PoolTypes.DYNAMIC,
+ poolSize,
+ workerChoiceStrategyFairSharePoolOption
+)
+
+const resultsFile = 'poolifier'
+const resultsFolder = 'benchmarks/internal/results'
+
+Benchmark.suite(
+ 'Poolifier',
+ Benchmark.add('Fixed:ThreadPool:RoundRobin', async () => {
+ await runTest(fixedThreadPoolRoundRobin, {
+ taskExecutions,
+ workerData