- for (const tasksQueue of [false, true]) {
- const pool = buildPool(
- workerType,
- poolType,
- poolSize,
- tasksQueue
- ? {
- ...{
- workerChoiceStrategy
- },
- ...{ enableTasksQueue: true }
- }
- : {
- workerChoiceStrategy
- }
- )
- pools.push([
- `${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${tasksQueue}`,
- pool
- ])
+ for (const enableTasksQueue of [false, true]) {
+ if (workerChoiceStrategy === WorkerChoiceStrategies.FAIR_SHARE) {
+ for (const measurement of [Measurements.runTime, Measurements.elu]) {
+ const pool = buildPool(workerType, poolType, poolSize, {
+ workerChoiceStrategy,
+ workerChoiceStrategyOptions: {
+ measurement
+ },
+ enableTasksQueue
+ })
+ pools.push([
+ `${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}|measurement:${measurement}`,
+ pool
+ ])
+ }
+ } else {
+ const pool = buildPool(workerType, poolType, poolSize, {
+ workerChoiceStrategy,
+ enableTasksQueue
+ })
+ pools.push([
+ `${poolType}|${workerType}|${workerChoiceStrategy}|tasks queue:${enableTasksQueue}`,
+ pool
+ ])
+ }