nx_bench_scale_dist_emit_test.nx
buildroot/runtime/nx_bench_scale_dist_emit_test.nx
about
nx_bench_scale_dist_emit_test.nx -- distribution measurement at 3 scales.
Composes [[nx_bench_stats]] over multiple scale points to produce a
real variance-vs-load curve. 30 total independent runs:
* 10 runs of v2 LLM 10-iter -> distribution A
* 10 runs of v2 LLM 30-iter -> distribution B
* 10 runs of v2 LLM 100-iter -> distribution C
Emits all three distributions side-by-side to stdout so the
operator sees how min/max/p50/p95/stddev scale with workload.
Substrate-honest claim this measurement supports:
* If p50 scales linearly with iter count and stddev scales
roughly linearly too -> substrate is well-behaved.
* If stddev grows faster than mean -> there's a load-dependent
variance bug.
* If p95/p50 ratio stays roughly constant across scales ->
no tail-degradation under load.
dependencies 11 imports · 0 importers
diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_tier.nxnx_clock.nxnx_actor.nxnx_message.nxnx_session.nxnx_bench_companion.nxnx_bench_companion_timed.nxnx_bench_stats.nxnx_gguf_fixture_tiny.nxnx_actor_role_llm_v2.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
| none |
functions
| 32 | func _emit_dec_i64(fd: i64, n: i64) -> i64 |
| 53 | func _emit_str(fd: i64, s: *u8, n: i64) -> i64 { sys_write(fd, s, n); return 0 } |
| 54 | func _emit_tab(fd: i64) -> i64 { let t: *u8 = sys_mmap(1); t[0] = 0x09 as u8; sys_write(fd, t, 1); return 0 } |
| 55 | func _emit_nl(fd: i64) -> i64 { let n: *u8 = sys_mmap(1); n[0] = 0x0A as u8; sys_write(fd, n, 1); return 0 } |
| 58 | func _drive_one_run(prng_seed: i64, n_iters: nx_int, now: nx_size) -> i64 |
| 89 | func _collect_dist(samples: *i64, n_runs: nx_int, n_iters: nx_int, |
| 102 | func _emit_dist_row(label: *u8, label_len: nx_int, |
| 124 | func main() -> i64 |