From fe7d90dbf8d2fd155f34759a2523af28a3572411 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 4 Jul 2023 17:08:57 +0200 Subject: [PATCH] refactor: remove unneeded private getter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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, -- 2.34.1