* 获取管理器统计信息
()
| 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 | * 清理资源 |
no test coverage detected