* 预填充所有池
()
| 210 | * 预填充所有池 |
| 211 | */ |
| 212 | public prewarmAllPools(): void { |
| 213 | for (const pool of this.pools.values()) { |
| 214 | const stats = pool.getStats(); |
| 215 | const prewarmCount = Math.floor(stats.maxSize * 0.2); // 预填充20% |
| 216 | pool.prewarm(prewarmCount); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * 重置池管理器 |