X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fabstract-pool.ts;h=b9a7cd398920fc77a754d3d4047414beae94ba46;hb=80662c0aec09419d198a5daba024674922ca5945;hp=eab110d8ec4d2200ec78320383874abbf333562a;hpb=49be33feded000ed776ee589274e154fa519b263;p=poolifier.git diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index eab110d8..b9a7cd39 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -440,8 +440,11 @@ export abstract class AbstractPool< workerTasksUsage.avgRunTime = workerTasksUsage.runTime / workerTasksUsage.run } - if (this.workerChoiceStrategyContext.getRequiredStatistics().medRunTime) { - workerTasksUsage.runTimeHistory.push(message.runTime ?? 0) + if ( + this.workerChoiceStrategyContext.getRequiredStatistics().medRunTime && + message.runTime != null + ) { + workerTasksUsage.runTimeHistory.push(message.runTime) workerTasksUsage.medRunTime = median(workerTasksUsage.runTimeHistory) } }