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

Function cx_measure_bigpkg_pair

tests/test_complexity.c:545–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543static bool g_cx_big_measured = false;
544
545static 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

Callers 1

test_complexity.cFile · 0.85

Calls 4

cbm_tmpdirFunction · 0.85
cbm_mkdtempFunction · 0.85
cx_build_bigpkgFunction · 0.85
cx_runFunction · 0.85

Tested by

no test coverage detected