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

Method _updateHitRate

packages/core/src/Utils/Pool/Pool.ts:267–274  ·  view source on GitHub ↗

* 更新命中率

()

Source from the content-addressed store, hash-verified

265 * 更新命中率
266 */
267 private _updateHitRate(): void {
268 if (this._stats.totalObtained === 0) {
269 this._stats.hitRate = 0;
270 } else {
271 const hits = this._stats.totalObtained - this._stats.totalCreated;
272 this._stats.hitRate = hits / this._stats.totalObtained;
273 }
274 }
275
276 /**
277 * 更新内存使用估算

Callers 1

obtainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected