MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / getStats

Method getStats

src/utils/usage-tracker.ts:848–859  ·  view source on GitHub ↗

* Get statistics about the internal dependency graph

()

Source from the content-addressed store, hash-verified

846 * Get statistics about the internal dependency graph
847 */
848 getStats(): { files: number; edges: number; avgDependencies: number } {
849 const files = this.imports.size;
850 let edges = 0;
851 for (const deps of this.imports.values()) {
852 edges += deps.size;
853 }
854 return {
855 files,
856 edges,
857 avgDependencies: files > 0 ? Math.round((edges / files) * 10) / 10 : 0
858 };
859 }
860
861 /**
862 * Serialize for persistence to .codebase-context/intelligence.json

Callers 3

toJSONMethod · 0.95
indexMethod · 0.95
handleFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected