| 543 | static bool g_cx_big_measured = false; |
| 544 | |
| 545 | static int cx_measure_bigpkg_pair(void) { |
| 546 | if (g_cx_big_measured) { |
| 547 | return 0; |
| 548 | } |
| 549 | const char *tmp = cbm_tmpdir(); |
| 550 | char ra[512]; |
| 551 | char rb[512]; |
| 552 | snprintf(ra, sizeof(ra), "%s/cbm_cxbig_a_XXXXXX", tmp); |
| 553 | snprintf(rb, sizeof(rb), "%s/cbm_cxbig_b_XXXXXX", tmp); |
| 554 | if (!cbm_mkdtemp(ra) || !cbm_mkdtemp(rb)) { |
| 555 | return -1; |
| 556 | } |
| 557 | if (cx_build_bigpkg(ra, CX_K_BASE) != 0 || cx_build_bigpkg(rb, CX_K_BASE * 2) != 0) { |
| 558 | return -1; |
| 559 | } |
| 560 | char db1[600]; |
| 561 | char db2[600]; |
| 562 | snprintf(db1, sizeof(db1), "%s/cx.db", ra); |
| 563 | snprintf(db2, sizeof(db2), "%s/cx.db", rb); |
| 564 | if (cx_run(ra, db1, &g_cx_big_base) != 0) { |
| 565 | return -1; |
| 566 | } |
| 567 | if (cx_run(rb, db2, &g_cx_big_doubled) != 0) { |
| 568 | return -1; |
| 569 | } |
| 570 | g_cx_big_measured = true; |
| 571 | return 0; |
| 572 | } |
| 573 | |
| 574 | /* One growing package instead of independent modules. Nodes and edges must |
| 575 | * still be linear in file count — and so must Σ per-file registry work: a |
no test coverage detected