code wiki / (root) / nx_bench_dist_emit_test.nx

nx_bench_dist_emit_test.nx

buildroot/runtime/nx_bench_dist_emit_test.nx

7206 B204 linesdepth 11pulls 45 transitivereach 0 importersview sourcekind gate/prooftopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_dist_emit_test.nx -- 10-run distribution measurement. Runs the v2 LLM 10-iter scenario TEN INDEPENDENT TIMES, captures wall-clock for each, computes min/max/mean/p50/p95/stddev across the 10 samples, and emits the distribution summary to stdout. This is the substrate-honest version of "single-point benchmark": every serious comparison reports distributions because variance matters. A p50 + p95 + stddev tells the operator far more than a single wall-clock number. Output (stdout): nx_bench_dist_v2_10iter N=10 min=... max=... mean=... p50=... p95=... stddev=... plus raw 10 wall-clock samples line so operators can re-analyze HONEST SCOPE: qemu-riscv64 emulated time. Variance under qemu is dominated by interpreter scheduling artifacts; native hardware will show different absolute numbers + variance shape. The SHAPE of the distribution (tight p50-p95 spread vs long-tail outliers) is the substrate-honest signal.

dependencies 11 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_clock.nx nx_actor.nx nx_message.nx nx_session.nx nx_bench_companion.nx nx_bench_companion_timed.nx nx_bench_stats.nx nx_gguf_fixture_tiny.nx nx_bench_dist_emit_test.nx

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

main sys_mmap _drive_one_run nx_gft_build_tiny_llama sys_mmap ↻ nx_le_write_u64 nx_le_write_u32 _gft_mk_blk_name _gft_write_ti nx_le_write_u64 ↻ nx_le_write_u32 ↻ nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value nx_le_read_u64 ↻ nx_le_read_u32 ↻ _gguf_skip_value ↻ sys_mmap ↻ nx_model_spec_new sys_mmap ↻ nx_model_spec_validate nx_norm_is_valid nx_act_is_valid nx_pos_is_valid nx_ffn_is_valid nx_bpe_vocab_new sys_mmap ↻ nx_intern_new nx_intern_next_pow2 nx_hash_new nx_bpe_add_token nx_intern_get nx_hash_fnv1a_bytes nx_hash_get nx_hash_probe nx_intern_bytes_eq nx_hash_put nx_hash_probe ↻

structs

none

consts

none

functions

34func _emit_dec_i64(fd: i64, n: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
55func _emit_str(fd: i64, s: *u8, n: i64) -> i64
called by 1: main calls 1: sys_write
60func _emit_nl(fd: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
67func _emit_tab(fd: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
76func _drive_one_run(prng_seed: i64, n_iters: nx_int, now: nx_size) -> i64
107func main() -> i64