code wiki / (root) / nx_bench_companion_tsv.nx

nx_bench_companion_tsv.nx

buildroot/runtime/nx_bench_companion_tsv.nx

11670 B304 linesdepth 5pulls 9 transitivereach 8 importersview sourcekind benchtopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_companion_tsv.nx -- emit NxBenchReport as TSV row to a caller-provided byte buffer. Sibling to [[nx_bench_companion]]. Substrate-honest persistence: the bench primitive captures counters; this primitive serializes them so they survive process exit + cross-session comparison becomes a `sort -t$'\t' -k4 -n` away. Format: tab-separated, label first, then 19 counter columns. Header row emitted by nx_bc_emit_tsv_header(). Data row by nx_bc_emit_tsv_row(). Both return byte-length written (>= 0) or NEGATIVE on buffer overflow. Per CARDINAL [[feedback-no-strawman-perf-comparisons]]: persisting the counters to disk lets future Nishi-vs-llama.cpp comparison rigs read paired rows + emit honest deltas without re-running every measurement.

dependencies 3 imports · 8 importers

nx_syscalls.nx nx_tier.nx nx_bench_companion.nx nx_bench_companion_tsv.nx nx_bench_companion_tsv_parse.nx nx_bench_companion_tsv_parse_test. nx_bench_companion_tsv_test.nx nx_bench_dist_persist_test.nx nx_bench_scale_test.nx nx_bench_stress_emit_test.nx nx_dual_real_llm_emit_test.nx nx_quad_real_emit_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_bench_companion.nx

imported by: nx_bench_companion_tsv_parse.nxnx_bench_companion_tsv_parse_test.nxnx_bench_companion_tsv_test.nxnx_bench_dist_persist_test.nxnx_bench_scale_test.nxnx_bench_stress_emit_test.nxnx_dual_real_llm_emit_test.nxnx_quad_real_emit_test.nx

structs

none

consts

25const NX_BCT_OK: nx_int = 0
26const NX_BCT_OVERFLOW: nx_int = 1
27const NX_BCT_NULL_BUF: nx_int = 2
28const NX_BCT_NULL_REPORT: nx_int = 3
29const NX_BCT_INVALID: nx_int = 4
30const NX_BCT_N: nx_int = 5

functions

32func nx_bct_v_is_valid(v: nx_int) -> nx_int
called by 1: main
45func _bct_emit_i64(buf: *u8, off: nx_int, cap: nx_int, n: i64) -> nx_int
90func _bct_emit_byte(buf: *u8, off: nx_int, cap: nx_int, b: nx_int) -> nx_int
97func _bct_emit_str(buf: *u8, off: nx_int, cap: nx_int,
called by 1: nx_bc_emit_tsv_row
118func nx_bc_emit_tsv_header(buf: *u8, cap: nx_int) -> nx_int
called by 5: mainmainmainmainmain calls 1: sys_mmap
240func _bct_emit_field(buf: *u8, off: nx_int, cap: nx_int, n: i64, sep: nx_int) -> nx_int
246func nx_bc_emit_tsv_row(buf: *u8, cap: nx_int,