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

Function id_sync_hook

tests/test_parallel.c:989–1002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987} id_sync_probe_t;
988
989static void id_sync_hook(cbm_gbuf_t *gb, void *ctx) {
990 id_sync_probe_t *probe = ctx;
991 probe->syncs++;
992 const cbm_gbuf_node_t **fns = NULL;
993 int n = 0;
994 if (!probe->push || cbm_gbuf_find_by_label(gb, "Function", &fns, &n) != 0 || n < 2) {
995 return;
996 }
997 char props[CBM_SZ_64];
998 for (int i = 0; i < ID_SYNC_PUSH; i++) {
999 snprintf(props, sizeof(props), "{\"id_sync_probe\":%d}", probe->syncs * ID_SYNC_PUSH + i);
1000 cbm_gbuf_insert_edge(gb, fns[0]->id, fns[1]->id, "CALLS", props);
1001 }
1002}
1003
1004typedef struct {
1005 int edges;

Callers

nothing calls this directly

Calls 2

cbm_gbuf_find_by_labelFunction · 0.85
cbm_gbuf_insert_edgeFunction · 0.85

Tested by

no test coverage detected