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

Function cx_pass_sink

tests/test_complexity.c:396–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394static _Atomic int g_cx_pass_count = 0;
395
396static void cx_pass_sink(const char *line) {
397 if (!line || !strstr(line, "pass.timing")) {
398 return;
399 }
400 const char *pp = strstr(line, "pass=");
401 const char *ee = strstr(line, "elapsed_ms=");
402 if (!pp || !ee) {
403 return;
404 }
405 int n = atomic_fetch_add_explicit(&g_cx_pass_count, 1, memory_order_relaxed);
406 if (n >= CX_MAX_PASSES) {
407 return;
408 }
409 size_t i = 0;
410 pp += 5;
411 while (pp[i] && pp[i] != ' ' && i < sizeof(g_cx_passes[n].name) - 1) {
412 g_cx_passes[n].name[i] = pp[i];
413 i++;
414 }
415 g_cx_passes[n].name[i] = '\0';
416 g_cx_passes[n].ms = atol(ee + 11);
417}
418
419/* Fixture-provided infra corpora (tests/fixtures/complexity/<name>/), scoped
420 * by their copy root: Kubernetes manifests with a kustomization (and a Flux

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected