(self: Pool<A, E>)
| 594 | } |
| 595 | return count |
| 596 | } |
| 597 | |
| 598 | const targetSize = <A, E>(self: Pool<A, E>) => { |
| 599 | if (self.state.isShuttingDown) return 0 |
| 600 | const utilization = currentUsage(self) / self.config.targetUtilization |
| 601 | const target = Math.ceil(utilization / self.config.concurrency) |
| 602 | return Math.min(Math.max(self.config.minSize, target), self.config.maxSize) |
| 603 | } |
| 604 |
no test coverage detected
searching dependent graphs…