X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fbench.js;h=4663d9c42bf2f27f38b78cb417acbe96bf6f2e86;hb=da3e130085b6eeafad308073b293eaba3f10baf7;hp=d615f66ea3d83a68c7b787e4ddb52395b1587b27;hpb=1f29c16f4e4eb928115b9cd0cad8d655e1580cc3;p=poolifier.git diff --git a/benchmarks/internal/bench.js b/benchmarks/internal/bench.js index d615f66e..4663d9c4 100644 --- a/benchmarks/internal/bench.js +++ b/benchmarks/internal/bench.js @@ -72,6 +72,13 @@ const fixedThreadPoolFairShare = buildPool( workerChoiceStrategyFairSharePoolOption ) +const fixedThreadPoolFairShareTasksQueue = buildPool( + WorkerTypes.THREAD, + PoolTypes.FIXED, + poolSize, + { ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption } +) + const dynamicThreadPoolRoundRobin = buildPool( WorkerTypes.THREAD, PoolTypes.DYNAMIC, @@ -149,6 +156,13 @@ const fixedClusterPoolFairShare = buildPool( workerChoiceStrategyFairSharePoolOption ) +const fixedClusterPoolFairShareTaskQueue = buildPool( + WorkerTypes.CLUSTER, + PoolTypes.FIXED, + poolSize, + { ...workerChoiceStrategyFairSharePoolOption, ...tasksQueuePoolOption } +) + const dynamicClusterPoolRoundRobin = buildPool( WorkerTypes.CLUSTER, PoolTypes.DYNAMIC, @@ -228,6 +242,15 @@ Benchmark.suite( workerData }) }), + Benchmark.add( + 'Fixed:ThreadPool:FairShare:{ enableTasksQueue: true }', + async () => { + await runTest(fixedThreadPoolFairShareTasksQueue, { + taskExecutions, + workerData + }) + } + ), Benchmark.add('Dynamic:ThreadPool:RoundRobin', async () => { await runTest(dynamicThreadPoolRoundRobin, { taskExecutions, @@ -297,6 +320,15 @@ Benchmark.suite( workerData }) }), + Benchmark.add( + 'Fixed:ClusterPool:FairShare:{ enableTasksQueue: true }', + async () => { + await runTest(fixedClusterPoolFairShareTaskQueue, { + taskExecutions, + workerData + }) + } + ), Benchmark.add('Dynamic:ClusterPool:RoundRobin', async () => { await runTest(dynamicClusterPoolRoundRobin, { taskExecutions,