utilization: round(this.utilization),
}),
workerNodes: this.workerNodes.length,
- ...(this.opts.enableTasksQueue === true && {
- stealingWorkerNodes: this.workerNodes.reduce(
- (accumulator, workerNode) =>
- workerNode.info.continuousStealing ||
- workerNode.info.backPressureStealing
- ? accumulator + 1
- : accumulator,
- 0
- ),
- }),
idleWorkerNodes: this.workerNodes.reduce(
(accumulator, _, workerNodeKey) =>
this.isWorkerNodeIdle(workerNodeKey) ? accumulator + 1 : accumulator,
this.isWorkerNodeBusy(workerNodeKey) ? accumulator + 1 : accumulator,
0
),
+ ...(this.opts.enableTasksQueue === true && {
+ stealingWorkerNodes: this.workerNodes.reduce(
+ (accumulator, workerNode) =>
+ workerNode.info.continuousStealing ||
+ workerNode.info.backPressureStealing
+ ? accumulator + 1
+ : accumulator,
+ 0
+ ),
+ }),
+ ...(this.opts.enableTasksQueue === true && {
+ backPressureWorkerNodes: this.workerNodes.reduce(
+ (accumulator, workerNode) =>
+ workerNode.info.backPressure ? accumulator + 1 : accumulator,
+ 0
+ ),
+ }),
executedTasks: this.workerNodes.reduce(
(accumulator, workerNode) =>
accumulator + workerNode.usage.tasks.executed,
readonly utilization?: number
/** Pool total worker nodes. */
readonly workerNodes: number
- /** Pool tasks stealing worker nodes. */
- readonly stealingWorkerNodes?: number
/** Pool idle worker nodes. */
readonly idleWorkerNodes: number
/** Pool busy worker nodes. */
readonly busyWorkerNodes: number
+ /** Pool tasks stealing worker nodes. */
+ readonly stealingWorkerNodes?: number
+ /** Pool tasks back pressure worker nodes. */
+ readonly backPressureWorkerNodes?: number
readonly executedTasks: number
readonly executingTasks: number
readonly queuedTasks?: number
minSize: expect.any(Number),
maxSize: expect.any(Number),
workerNodes: expect.any(Number),
- stealingWorkerNodes: expect.any(Number),
idleWorkerNodes: expect.any(Number),
busyWorkerNodes: expect.any(Number),
+ stealingWorkerNodes: expect.any(Number),
+ backPressureWorkerNodes: expect.any(Number),
executedTasks: expect.any(Number),
executingTasks: expect.any(Number),
maxQueuedTasks: expect.any(Number),