MCPcopy Create free account
hub / github.com/buct2012dbl/Dorchestrator / getStats

Method getStats

coding-agent/src/context/database.ts:217–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215
216 // Statistics
217 getStats() {
218 const fileCount = this.db.prepare('SELECT COUNT(*) as count FROM files').get() as { count: number };
219 const symbolCount = this.db.prepare('SELECT COUNT(*) as count FROM symbols').get() as { count: number };
220 const depCount = this.db.prepare('SELECT COUNT(*) as count FROM dependencies').get() as { count: number };
221
222 const langStats = this.db.prepare(`
223 SELECT language, COUNT(*) as count
224 FROM files
225 GROUP BY language
226 ORDER BY count DESC
227 `).all() as Array<{ language: string; count: number }>;
228
229 return {
230 files: fileCount.count,
231 symbols: symbolCount.count,
232 dependencies: depCount.count,
233 byLanguage: langStats
234 };
235 }
236
237 close(): void {
238 this.db.close();

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected