X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fselection-strategies%2Fabstract-worker-choice-strategy.ts;h=8ab3d360ca67f210db221fcdd424039799cf6668;hb=15e5141f463661f3dd0f17e8a9402703fddd4050;hp=0d337b53191f4a991368ea66976761d95fda1027;hpb=afc003b20097712625ffd053e256ef5336e27b6e;p=poolifier.git diff --git a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts index 0d337b53..8ab3d360 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -17,13 +17,14 @@ export abstract class AbstractWorkerChoiceStrategy< Worker extends IPoolWorker, Data = unknown, Response = unknown -> implements IWorkerChoiceStrategy { +> implements IWorkerChoiceStrategy { /** @inheritDoc */ - public readonly isDynamicPool: boolean + protected readonly isDynamicPool: boolean /** @inheritDoc */ public requiredStatistics: RequiredStatistics = { runTime: false, - avgRunTime: false + avgRunTime: false, + medRunTime: false } /** @@ -32,7 +33,7 @@ export abstract class AbstractWorkerChoiceStrategy< * @param pool - The pool instance. */ public constructor ( - public readonly pool: IPoolInternal + protected readonly pool: IPoolInternal ) { this.isDynamicPool = this.pool.type === PoolType.DYNAMIC this.choose.bind(this)