Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
Date.now(),
this.workerLastVirtualTaskTimestamp.get(worker)?.end ?? -Infinity
)
- const workerVirtualTaskEndTimestamp =
- workerVirtualTaskStartTimestamp +
- (this.pool.getWorkerAverageTasksRunTime(worker) ?? 0)
this.workerLastVirtualTaskTimestamp.set(worker, {
start: workerVirtualTaskStartTimestamp,
- end: workerVirtualTaskEndTimestamp
+ end:
+ workerVirtualTaskStartTimestamp +
+ (this.pool.getWorkerAverageTasksRunTime(worker) ?? 0)
})
}
}