| 1024 | NULL}; |
| 1025 | |
| 1026 | static void dump_edge_histogram(cbm_store_t *store, const char *project) { |
| 1027 | if (!store) { |
| 1028 | fprintf(stderr, " └─ (no graph DB)\n"); |
| 1029 | return; |
| 1030 | } |
| 1031 | char line[640] = {0}; |
| 1032 | for (int i = 0; ALL_EDGE_TYPES[i]; i++) { |
| 1033 | int c = cbm_store_count_edges_by_type(store, project, ALL_EDGE_TYPES[i]); |
| 1034 | if (c > 0 && strlen(line) < sizeof(line) - 48) { |
| 1035 | char one[64]; |
| 1036 | snprintf(one, sizeof(one), "%s=%d ", ALL_EDGE_TYPES[i], c); |
| 1037 | strncat(line, one, sizeof(line) - strlen(line) - 1); |
| 1038 | } |
| 1039 | } |
| 1040 | fprintf(stderr, " └─ edges produced: [%s]\n", line[0] ? line : "(none)"); |
| 1041 | } |
| 1042 | |
| 1043 | /* Index `files`, assert the named edge type appears at least `floor` times. |
| 1044 | * On failure, dump the full edge histogram so a regression is diagnosable. */ |
no test coverage detected