: this.pool.workerNodes[workerNodeKey].tasksUsage.avgRunTime
}
+ /**
+ * Gets the worker task wait time.
+ * If the required statistics are `avgWaitTime`, the average wait time is returned.
+ * If the required statistics are `medWaitTime`, the median wait time is returned.
+ *
+ * @param workerNodeKey - The worker node key.
+ * @returns The worker task wait time.
+ */
+ protected getWorkerWaitTime (workerNodeKey: number): number {
+ return this.requiredStatistics.medWaitTime
+ ? this.pool.workerNodes[workerNodeKey].tasksUsage.medWaitTime
+ : this.pool.workerNodes[workerNodeKey].tasksUsage.avgWaitTime
+ }
+
/**
* Finds the first free worker node key based on the number of tasks the worker has applied.
*