refactor: switch Date.now() -> performance.now() where appropriate
[poolifier.git] / src / pools / selection-strategies / abstract-worker-choice-strategy.ts
index f32229ec3da8550d49263f2ed76a434a63d6d97b..8ab3d360ca67f210db221fcdd424039799cf6668 100644 (file)
@@ -19,11 +19,12 @@ export abstract class AbstractWorkerChoiceStrategy<
   Response = unknown
 > 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<Worker, Data, Response>
+    protected readonly pool: IPoolInternal<Worker, Data, Response>
   ) {
     this.isDynamicPool = this.pool.type === PoolType.DYNAMIC
     this.choose.bind(this)