*/
export type WorkerChoiceStrategy = keyof typeof WorkerChoiceStrategies
+/**
+ * Worker choice strategy options.
+ */
+export interface WorkerChoiceStrategyOptions {
+ /**
+ * Use tasks median run time instead of average run time.
+ *
+ * @defaultValue false
+ */
+ medRunTime?: boolean
+}
+
/**
* Pool worker tasks usage statistics requirements.
+ *
+ * @internal
*/
export interface RequiredStatistics {
+ /**
+ * Require tasks run time.
+ */
runTime: boolean
+ /**
+ * Require tasks average run time.
+ */
avgRunTime: boolean
+ /**
+ * Require tasks median run time.
+ */
medRunTime: boolean
}
* @param workerNodeKey - The worker node key.
*/
remove: (workerNodeKey: number) => boolean
+ /**
+ * Sets the worker choice strategy options.
+ *
+ * @param opts - The worker choice strategy options.
+ */
+ setOptions: (opts: WorkerChoiceStrategyOptions) => void
}