From: Jérôme Benoit Date: Tue, 4 Jul 2023 15:08:57 +0000 (+0200) Subject: refactor: remove unneeded private getter X-Git-Tag: v2.6.9~20^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=fe7d90dbf8d2fd155f34759a2523af28a3572411;p=poolifier.git refactor: remove unneeded private getter Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 796cff1d..283b04d6 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -300,22 +300,14 @@ export abstract class AbstractPool< } } - /** - * Gets the pool run time. - * - * @returns The pool run time in milliseconds. - */ - private get runTime (): number { - return performance.now() - this.startTimestamp - } - /** * Gets the approximate pool utilization. * * @returns The pool utilization. */ private get utilization (): number { - const poolRunTimeCapacity = this.runTime * this.maxSize + const poolRunTimeCapacity = + (performance.now() - this.startTimestamp) * this.maxSize const totalTasksRunTime = this.workerNodes.reduce( (accumulator, workerNode) => accumulator + workerNode.usage.runTime.aggregate,