From: Jérôme Benoit Date: Sun, 19 May 2024 21:16:43 +0000 (+0200) Subject: refactor: add ELU utilization to pool info X-Git-Tag: v4.0.9~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=be202c2c43686b8d46d7061622e17b6c173c9e33;p=poolifier.git refactor: add ELU utilization to pool info Trends on a ratio is not really meaningful but can help debugging Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 12ad6995..649d5f0d 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -538,6 +538,22 @@ export abstract class AbstractPool< ) ) }) + }, + utilization: { + average: round( + average( + this.workerNodes.map( + workerNode => workerNode.usage.elu.utilization ?? 0 + ) + ) + ), + median: round( + median( + this.workerNodes.map( + workerNode => workerNode.usage.elu.utilization ?? 0 + ) + ) + ) } } }) diff --git a/src/pools/pool.ts b/src/pools/pool.ts index a3552e48..a025f3ce 100644 --- a/src/pools/pool.ts +++ b/src/pools/pool.ts @@ -126,6 +126,10 @@ export interface PoolInfo { readonly average?: number readonly median?: number } + utilization: { + readonly average?: number + readonly median?: number + } } }