MCPcopy Index your code
hub / github.com/BlockRunAI/ClawRouter / getStats

Method getStats

src/response-cache.ts:277–296  ·  view source on GitHub ↗

* Get cache statistics.

()

Source from the content-addressed store, hash-verified

275 * Get cache statistics.
276 */
277 getStats(): {
278 size: number;
279 maxSize: number;
280 hits: number;
281 misses: number;
282 evictions: number;
283 hitRate: string;
284 } {
285 const total = this.stats.hits + this.stats.misses;
286 const hitRate = total > 0 ? ((this.stats.hits / total) * 100).toFixed(1) + "%" : "0%";
287
288 return {
289 size: this.cache.size,
290 maxSize: this.config.maxSize,
291 hits: this.stats.hits,
292 misses: this.stats.misses,
293 evictions: this.stats.evictions,
294 hitRate,
295 };
296 }
297
298 /**
299 * Clear all cached entries.

Callers 1

startProxyFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected