X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fselection-strategies-types.ts;h=b96bb029a0befe39ce438beb368e2c0dbecb87ab;hb=4f487526a63c873d168386250b40ad8103c5a4d8;hp=c90036fe6f269dd7757482064a3fdba0b7a97e97;hpb=802983837716dc38305c13f905a1977688365293;p=poolifier.git diff --git a/src/pools/selection-strategies/selection-strategies-types.ts b/src/pools/selection-strategies/selection-strategies-types.ts index c90036fe..b96bb029 100644 --- a/src/pools/selection-strategies/selection-strategies-types.ts +++ b/src/pools/selection-strategies/selection-strategies-types.ts @@ -14,6 +14,12 @@ export const WorkerChoiceStrategies = Object.freeze({ * Least busy worker selection strategy. */ LEAST_BUSY: 'LEAST_BUSY', + /** + * Least ELU worker selection strategy. + * + * @experimental + */ + LEAST_ELU: 'LEAST_ELU', /** * Fair share worker selection strategy. */ @@ -21,7 +27,13 @@ export const WorkerChoiceStrategies = Object.freeze({ /** * Weighted round robin worker selection strategy. */ - WEIGHTED_ROUND_ROBIN: 'WEIGHTED_ROUND_ROBIN' + WEIGHTED_ROUND_ROBIN: 'WEIGHTED_ROUND_ROBIN', + /** + * Interleaved weighted round robin worker selection strategy. + * + * @experimental + */ + INTERLEAVED_WEIGHTED_ROUND_ROBIN: 'INTERLEAVED_WEIGHTED_ROUND_ROBIN' } as const) /** @@ -59,7 +71,7 @@ export interface WorkerChoiceStrategyOptions { * * @internal */ -export interface RequiredStatistics { +export interface TaskStatistics { /** * Require tasks runtime. */ @@ -84,6 +96,10 @@ export interface RequiredStatistics { * Require tasks median wait time. */ medWaitTime: boolean + /** + * Event loop utilization. + */ + elu: boolean } /** @@ -91,9 +107,9 @@ export interface RequiredStatistics { */ export interface IWorkerChoiceStrategy { /** - * Required tasks usage statistics. + * Required tasks statistics. */ - readonly requiredStatistics: RequiredStatistics + readonly taskStatistics: TaskStatistics /** * Resets strategy internals. *