From 313f98acb018dfdff5f2846d8e1f0e987af16956 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 24 Aug 2023 20:37:05 +0200 Subject: [PATCH] docs: refine worker choice strategies documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .vscode/settings.json | 1 + docs/worker-choice-strategies.md | 6 +++--- .../selection-strategies/selection-strategies-types.ts | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3ae20ea4..e146c7ad 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,6 +18,7 @@ "FOSS", "Gitter", "inheritDoc", + "IWWR", "jaywcjlove", "lcov", "libuv", diff --git a/docs/worker-choice-strategies.md b/docs/worker-choice-strategies.md index a2b035f7..e79bd20c 100644 --- a/docs/worker-choice-strategies.md +++ b/docs/worker-choice-strategies.md @@ -20,13 +20,13 @@ By default, the strategy uses the simple moving average task execution time for ### Weighted round robin -The worker weights are maximum tasks execution time, once the worker has reached its maximum tasks execution time, the next task is assigned to the next worker. The worker default weights are the same for all workers and is computed given the CPU cores speed and theirs numbers. +The worker weights are maximum tasks execution time, once the worker has reached its maximum tasks execution time, the next task is assigned to the next worker. The default worker weight is the same for each and computed given the CPU cores speed and theirs numbers. ### Interleaved weighted round robin The worker weights are maximum tasks execution time. The rounds are the deduplicated worker weights. -During a round, if worker weight is inferior to the current round, the next task is assigned to the next worker. Once all workers have been assigned a task, the next round starts. -The worker default weights are the same for all workers and is computed given the CPU cores speed and theirs numbers. So the default rounds consists of a unique worker weight. +During a round, if worker weight is inferior to the current round weight, the next task is assigned to the next worker. Once all workers have been assigned a task, the next round starts. +The default worker weights is the same for each and computed given the CPU cores speed and theirs numbers. So the default 'rounds' consists of a unique worker weight. ## Statistics diff --git a/src/pools/selection-strategies/selection-strategies-types.ts b/src/pools/selection-strategies/selection-strategies-types.ts index 6a6dfe72..5f2edb25 100644 --- a/src/pools/selection-strategies/selection-strategies-types.ts +++ b/src/pools/selection-strategies/selection-strategies-types.ts @@ -96,10 +96,10 @@ export interface WorkerChoiceStrategyOptions { */ readonly elu?: MeasurementOptions /** - * Worker weights to use for weighted round robin worker selection strategy. - * Weight is the tasks maximum average or median runtime in milliseconds. + * Worker weights to use for weighted round robin worker selection strategies. + * A weight is the tasks maximum execution in milliseconds for each worker node. * - * @defaultValue Computed worker weights automatically given the CPU performance. + * @defaultValue Weights computed automatically given the CPU performance. */ readonly weights?: Record } -- 2.34.1