refactor: cleanup variables namespace
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 10 Jul 2023 09:02:30 +0000 (11:02 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 10 Jul 2023 09:02:30 +0000 (11:02 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
src/worker/abstract-worker.ts

index 8beede87c359e3559e41aa7652a007ee64eacaff..cb5d4ce7f60d81129ed9015108e10b14c4cbef80 100644 (file)
@@ -426,7 +426,7 @@ export abstract class AbstractPool<
    * @returns The pool utilization.
    */
   private get utilization (): number {
-    const poolRunTimeCapacity =
+    const poolTimeCapacity =
       (performance.now() - this.startTimestamp) * this.maxSize
     const totalTasksRunTime = this.workerNodes.reduce(
       (accumulator, workerNode) =>
@@ -438,7 +438,7 @@ export abstract class AbstractPool<
         accumulator + (workerNode.usage.waitTime?.aggregate ?? 0),
       0
     )
-    return (totalTasksRunTime + totalTasksWaitTime) / poolRunTimeCapacity
+    return (totalTasksRunTime + totalTasksWaitTime) / poolTimeCapacity
   }
 
   /**
index bfdff391cba86be9c9399837062ac8c5523b6087..93a36bad382fe5781f35d73b71a8169510b818ac 100644 (file)
@@ -303,7 +303,7 @@ export abstract class AbstractWorker<
   }
 
   /**
-   * Starts the worker alive check interval.
+   * Starts the worker aliveness check interval.
    */
   private startCheckAlive (): void {
     this.lastTaskTimestamp = performance.now()
@@ -315,7 +315,7 @@ export abstract class AbstractWorker<
   }
 
   /**
-   * Stops the worker alive check interval.
+   * Stops the worker aliveness check interval.
    */
   private stopCheckAlive (): void {
     this.aliveInterval != null && clearInterval(this.aliveInterval)