worker: WorkerType
minSize: number
maxSize: number
+ /** Pool utilization ratio. */
utilization: number
+ /** Pool total worker nodes */
workerNodes: number
+ /** Pool idle worker nodes */
idleWorkerNodes: number
+ /** Pool busy worker nodes */
busyWorkerNodes: number
executedTasks: number
executingTasks: number
*/
execute: (data?: Data, name?: string) => Promise<Response>
/**
- * Terminate every current worker in this pool.
+ * Terminates every current worker in this pool.
*/
destroy: () => Promise<void>
/**
*/
export interface MeasurementStatisticsRequirements {
/**
- * Require measurement aggregate.
+ * Requires measurement aggregate.
*/
aggregate: boolean
/**
- * Require measurement average.
+ * Requires measurement average.
*/
average: boolean
/**
- * Require measurement median.
+ * Requires measurement median.
*/
median: boolean
}
*/
export interface IWorker {
/**
- * Register an event listener.
+ * Registers an event listener.
*
* @param event - The event.
* @param handler - The event handler.
((event: 'online', handler: OnlineHandler<this>) => void) &
((event: 'exit', handler: ExitHandler<this>) => void)
/**
- * Register a listener to the exit event that will only be performed once.
+ * Registers a listener to the exit event that will only be performed once.
*
* @param event - `'exit'`.
* @param handler - The exit handler.
}
/**
- * Peek at the first item.
+ * Peeks at the first item.
*
* @returns The first item or `undefined` if the queue is empty.
*/
}
/**
- * Clear the queue.
+ * Clears the queue.
*/
public clear (): void {
this.items = []
/**
* Rounds the given number to the given scale.
+ * The rounding is done using the "round half away from zero" method.
*
* @param num - The number to round.
* @param scale - The scale to round to.