| 394 | static _Atomic int g_cx_pass_count = 0; |
| 395 | |
| 396 | static 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 |
nothing calls this directly
no outgoing calls
no test coverage detected