Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy'
import type {
IWorkerChoiceStrategy,
- TaskStatistics,
+ TaskStatisticsRequirements,
WorkerChoiceStrategyOptions
} from './selection-strategies-types'
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
implements IWorkerChoiceStrategy {
/** @inheritDoc */
- public readonly taskStatistics: TaskStatistics = {
+ public readonly taskStatisticsRequirements: TaskStatisticsRequirements = {
runTime: false,
avgRunTime: false,
medRunTime: false,
'./tests/worker-files/thread/testWorker.js',
{ workerChoiceStrategy }
)
- expect(pool.workerChoiceStrategyContext.getTaskStatistics()).toStrictEqual({
+ expect(
+ pool.workerChoiceStrategyContext.getTaskStatisticsRequirements()
+ ).toStrictEqual({
runTime: false,
avgRunTime: false,
medRunTime: false,
'./tests/worker-files/thread/testWorker.js',
{ workerChoiceStrategy }
)
- expect(pool.workerChoiceStrategyContext.getTaskStatistics()).toStrictEqual({
+ expect(
+ pool.workerChoiceStrategyContext.getTaskStatisticsRequirements()
+ ).toStrictEqual({
runTime: false,
avgRunTime: false,
medRunTime: false,