MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / call_count

Function call_count

tests/repro/repro_call_scope_usages.c:60–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static int call_count(const CBMFileResult *r, const char *caller, const char *target) {
61 int count = 0;
62 for (int i = 0; i < r->calls.count; i++) {
63 const CBMCall *call = &r->calls.items[i];
64 const char *callee = call_short_name(call->callee_name);
65 if (callee && strcmp(callee, target) == 0 &&
66 (!caller || qn_ends_with(call->enclosing_func_qn, caller))) {
67 count++;
68 }
69 }
70 return count;
71}
72
73static int exact_usage_count(const CBMFileResult *r, const char *caller_qn, const char *target) {
74 int count = 0;

Callers 1

Calls 2

call_short_nameFunction · 0.85
qn_ends_withFunction · 0.70

Tested by

no test coverage detected