MCPcopy Create free account
hub / github.com/echoVic/blade-code / getStats

Method getStats

src/context/ContextManager.ts:351–369  ·  view source on GitHub ↗

* 获取管理器统计信息

()

Source from the content-addressed store, hash-verified

349 * 获取管理器统计信息
350 */
351 async getStats(): Promise<{
352 currentSession: string | null;
353 memory: any;
354 cache: any;
355 storage: any;
356 }> {
357 const [memoryInfo, cacheStats, storageStats] = await Promise.all([
358 Promise.resolve(this.memory.getMemoryInfo()),
359 Promise.resolve(this.cache.getStats()),
360 this.persistent.getStorageStats(),
361 ]);
362
363 return {
364 currentSession: this.currentSessionId,
365 memory: memoryInfo,
366 cache: cacheStats,
367 storage: storageStats,
368 };
369 }
370
371 /**
372 * 清理资源

Callers 2

toolsCommandFunction · 0.45
exampleFunction · 0.45

Calls 2

getMemoryInfoMethod · 0.80
getStorageStatsMethod · 0.80

Tested by

no test coverage detected