From: Jérôme Benoit Date: Sun, 23 Jul 2023 19:16:24 +0000 (+0200) Subject: perf: cleanup benchmark code X-Git-Tag: v2.6.21~27 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=6bec21ed1a00f7a62c5ccc12d4bdf8f8998be978;p=poolifier.git perf: cleanup benchmark code Signed-off-by: Jérôme Benoit --- diff --git a/benchmarks/internal/bench.mjs b/benchmarks/internal/bench.mjs index 48f30f66..8235d572 100644 --- a/benchmarks/internal/bench.mjs +++ b/benchmarks/internal/bench.mjs @@ -20,26 +20,24 @@ for (const poolType of Object.values(PoolTypes)) { for (const enableTasksQueue of [false, true]) { if (workerChoiceStrategy === WorkerChoiceStrategies.FAIR_SHARE) { for (const measurement of [Measurements.runTime, Measurements.elu]) { - const pool = buildPool(workerType, poolType, poolSize, { - workerChoiceStrategy, - workerChoiceStrategyOptions: { - measurement - }, - enableTasksQueue - }) pools.push([ `${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}|measurement:${measurement}`, - pool + buildPool(workerType, poolType, poolSize, { + workerChoiceStrategy, + workerChoiceStrategyOptions: { + measurement + }, + enableTasksQueue + }) ]) } } else { - const pool = buildPool(workerType, poolType, poolSize, { - workerChoiceStrategy, - enableTasksQueue - }) pools.push([ `${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}`, - pool + buildPool(workerType, poolType, poolSize, { + workerChoiceStrategy, + enableTasksQueue + }) ]) } }