X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fworker-selection%2Fround-robin.mjs;h=64ea78da719cf0ef0607bfa4f8e27cb0e4977388;hb=3b594fe1b0f89d6665da2eb2ebdc14eb7628fe70;hp=d39fd699f58016e69052f52dbcf87e6945c5f07b;hpb=3a5027122ca6401ae1d755843b20f714c61e3240;p=poolifier.git diff --git a/benchmarks/worker-selection/round-robin.mjs b/benchmarks/worker-selection/round-robin.mjs index d39fd699..64ea78da 100644 --- a/benchmarks/worker-selection/round-robin.mjs +++ b/benchmarks/worker-selection/round-robin.mjs @@ -3,6 +3,7 @@ import { bench, group, run } from 'tatami-ng' /** * * @param numberOfWorkers + * @returns */ function generateWorkersArray (numberOfWorkers) { return [...Array(numberOfWorkers).keys()] @@ -13,7 +14,7 @@ const workers = generateWorkersArray(60) let nextWorkerIndex /** - * + * @returns */ function roundRobinTernaryOffByOne () { nextWorkerIndex = @@ -22,7 +23,7 @@ function roundRobinTernaryOffByOne () { } /** - * + * @returns */ function roundRobinTernaryWithNegation () { nextWorkerIndex = @@ -33,7 +34,7 @@ function roundRobinTernaryWithNegation () { } /** - * + * @returns */ function roundRobinTernaryWithPreChoosing () { const chosenWorker = workers[nextWorkerIndex] @@ -43,7 +44,7 @@ function roundRobinTernaryWithPreChoosing () { } /** - * + * @returns */ function roundRobinIncrementModulo () { const chosenWorker = workers[nextWorkerIndex]