| 886 | NULL}; |
| 887 | |
| 888 | static void dump_edge_histogram(cbm_store_t *store, const char *project) { |
| 889 | if (!store) { |
| 890 | fprintf(stderr, " └─ (no graph DB)\n"); |
| 891 | return; |
| 892 | } |
| 893 | char line[640] = {0}; |
| 894 | for (int i = 0; ALL_EDGE_TYPES[i]; i++) { |
| 895 | int c = cbm_store_count_edges_by_type(store, project, ALL_EDGE_TYPES[i]); |
| 896 | if (c > 0 && strlen(line) < sizeof(line) - 48) { |
| 897 | char one[64]; |
| 898 | snprintf(one, sizeof(one), "%s=%d ", ALL_EDGE_TYPES[i], c); |
| 899 | strncat(line, one, sizeof(line) - strlen(line) - 1); |
| 900 | } |
| 901 | } |
| 902 | fprintf(stderr, " └─ edges produced: [%s]\n", line[0] ? line : "(none)"); |
| 903 | } |
| 904 | |
| 905 | /* Index `files`, assert the named edge type appears at least `floor` times. |
| 906 | * On failure, dump the full edge histogram so a regression is diagnosable. */ |
no test coverage detected