nx_coindex_bench_gate.nx
buildroot/runtime/nx_coindex_bench_gate.nx
about
nx_coindex_bench_gate.nx -- MEASURED concurrent-writer benchmark for the conflict-free co-index
(R-ORCH-2). Exists because the coordinator CAUGHT ITSELF crediting nx_coindex with the WMS's R11
measurement it never individually earned (the exact self-grading the triage v2 forbids). This
gate makes it earn a number: 8 FORKED writer processes x 12 appends each, through BOTH paths --
GOOD = ci_append (flock + O_APPEND single-write): must land 96/96, ZERO lost, timed.
BAD = the naive read-modify-write a hand-edited shared file degrades to (read whole -> append in
memory -> truncate-write whole, no lock, deliberate window): must MEASURABLY lose entries
-- the RUN comparator proving the failure mode is real physics, not hypothesis.
git = the named external yardstick, STATED by-design (index.lock: concurrent committers
serialize-or-FAIL and must retry; the naive path loses SILENTLY; coindex = all land, no retry).
GREEN iff good_lost==0 AND bad_lost>0 (the neg-control must fire). Journals the measured line.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_coindex_core.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 19 | const NW: i64 = 8 // workers |
| 20 | const NR: i64 = 12 // appends per worker |
functions
| 16 | func b_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 17 | func b_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 23 | func b_good_child(w: i64) -> i64 |
| 45 | func b_bad_child(w: i64) -> i64 |
| 66 | func b_run_fleet(which: i64) -> i64 |
| 82 | func main(argc: i64, argv: *i64) -> i64 |