nx_bench_scale_test.nx
buildroot/runtime/nx_bench_scale_test.nx
about
nx_bench_scale_test.nx -- substrate scaling under increasing workload.
Runs the v2 LLM actor at 3 different iteration counts (10 / 30 / 100)
and emits ONE TSV row + wallclock_elapsed_us per scale to stdout.
Each scale is an INDEPENDENT measurement: fresh session, fresh
fixture, fresh PRNG seed, fresh wall-clock window.
What this answers:
* Does wall-clock scale ROUGHLY LINEARLY with iteration count?
If yes -> substrate has no quadratic overhead under load.
If no -> there's a scaling bug we need to find.
* Do counters scale exactly linearly? (They should: 3 phases per
iteration * N iterations = 3*N actor steps; 1000us logical per
step = 3000*N us logical runtime.)
Output format: standard nx_bench TSV header once, then one row per
scale (labels "scale_v2_10" / "scale_v2_30" / "scale_v2_100") plus
per-scale wallclock_elapsed_us lines. Operator can pipe to file +
sort -t$'\t' -k7n to see the scaling curve.
HONEST SCOPE: qemu-riscv64 wall-clock includes interpreter overhead;
the SHAPE of the scaling (linear vs quadratic) is what matters, not
the absolute numbers. Physical-hardware run will refine the
absolute numbers; the shape claim should hold across both.
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_companion_tsv.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
| 38 | func _emit_dec_i64(fd: i64, n: i64) -> i64 |
| 57 | func _emit_elapsed_label(fd: i64) -> i64 |
| 75 | func _run_scale(n_iters: nx_int, |
| 131 | func main() -> i64 |