MCPcopy Create free account
hub / github.com/esengine/esengine / prewarmAllPools

Method prewarmAllPools

packages/core/src/Utils/Pool/PoolManager.ts:212–218  ·  view source on GitHub ↗

* 预填充所有池

()

Source from the content-addressed store, hash-verified

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 * 重置池管理器

Callers

nothing calls this directly

Calls 3

getStatsMethod · 0.65
valuesMethod · 0.45
prewarmMethod · 0.45

Tested by

no test coverage detected