repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: cleanup queued tasks computation
[poolifier.git]
/
src
/
pools
/
worker.ts
diff --git
a/src/pools/worker.ts
b/src/pools/worker.ts
index 70e4a7edd0ee481a0b608bb53ae6463d3517c144..598e6be82ca22588c34f04d6a0c402359956b66d 100644
(file)
--- a/
src/pools/worker.ts
+++ b/
src/pools/worker.ts
@@
-1,4
+1,3
@@
-import type { EventLoopUtilization } from 'node:perf_hooks'
import type { CircularArray } from '../circular-array'
import type { Queue } from '../queue'
import type { CircularArray } from '../circular-array'
import type { Queue } from '../queue'
@@
-80,6
+79,17
@@
export interface MeasurementStatistics {
history: CircularArray<number>
}
history: CircularArray<number>
}
+/**
+ * Event loop utilization measurement statistics.
+ *
+ * @internal
+ */
+export interface EventLoopUtilizationMeasurementStatistics {
+ idle: MeasurementStatistics
+ active: MeasurementStatistics
+ utilization: number
+}
+
/**
* Task statistics.
*
/**
* Task statistics.
*
@@
-123,9
+133,9
@@
export interface WorkerUsage {
*/
waitTime: MeasurementStatistics
/**
*/
waitTime: MeasurementStatistics
/**
- *
Event loop utilization
.
+ *
Tasks event loop utilization statistics
.
*/
*/
- elu: EventLoopUtilization
| undefined
+ elu: EventLoopUtilization
MeasurementStatistics
}
/**
}
/**