protected readonly pool: IPool<Worker, Data, Response>,
protected opts: InternalWorkerChoiceStrategyOptions
) {
- this.setOptions(this.opts)
+ // this.setOptions(this.opts)
+ this.opts = buildInternalWorkerChoiceStrategyOptions(
+ this.pool.info.maxSize,
+ this.opts
+ )
+ this.setTaskStatisticsRequirements(this.opts)
this.choose = this.choose.bind(this)
}
Object.keys(workerChoiceStrategy.opts.weights).length,
runTime: { median: false },
waitTime: { median: false },
- elu: { median: false }
- // weights: expect.objectContaining({
- // 0: expect.any(Number),
- // [pool.info.maxSize - 1]: expect.any(Number)
- // })
+ elu: { median: false },
+ weights: expect.objectContaining({
+ 0: expect.any(Number),
+ [pool.info.maxSize - 1]: expect.any(Number)
+ })
})
)
}
runTime: { median: false },
waitTime: { median: false },
elu: { median: false }
- // weights: expect.objectContaining({
- // 0: expect.any(Number),
- // [pool.info.maxSize - 1]: expect.any(Number)
- // })
})
)
}
runTime: { median: true },
waitTime: { median: false },
elu: { median: true }
- // weights: expect.objectContaining({
- // 0: expect.any(Number),
- // [pool.info.maxSize - 1]: expect.any(Number)
- // })
})
)
}
runTime: { median: false },
waitTime: { median: false },
elu: { median: false }
- // weights: expect.objectContaining({
- // 0: expect.any(Number),
- // [pool.info.maxSize - 1]: expect.any(Number)
- // })
})
)
}