MCPcopy
hub / github.com/colbymchenry/codegraph / graphCounts

Function graphCounts

__tests__/index-command.test.ts:42–50  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

40}
41
42function graphCounts(dir: string): { nodes: number; edges: number } {
43 const cg = CodeGraph.openSync(dir);
44 try {
45 const stats = cg.getStats();
46 return { nodes: stats.nodeCount, edges: stats.edgeCount };
47 } finally {
48 cg.close();
49 }
50}
51
52describe('codegraph index — full re-index keeps the graph populated (#874)', () => {
53 let tempDir: string;

Callers 1

Calls 3

openSyncMethod · 0.80
closeMethod · 0.65
getStatsMethod · 0.45

Tested by

no test coverage detected