From 6bec21ed1a00f7a62c5ccc12d4bdf8f8998be978 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 23 Jul 2023 21:16:24 +0200 Subject: [PATCH] perf: cleanup benchmark code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- benchmarks/internal/bench.mjs | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) 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 + }) ]) } } -- 2.34.1