nx_bench_companion_tsv.nx
buildroot/runtime/nx_bench_companion_tsv.nx
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
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
| 25 | const NX_BCT_OK: nx_int = 0 |
| 26 | const NX_BCT_OVERFLOW: nx_int = 1 |
| 27 | const NX_BCT_NULL_BUF: nx_int = 2 |
| 28 | const NX_BCT_NULL_REPORT: nx_int = 3 |
| 29 | const NX_BCT_INVALID: nx_int = 4 |
| 30 | const NX_BCT_N: nx_int = 5 |
functions
| 32 | func nx_bct_v_is_valid(v: nx_int) -> nx_int called by 1: main |
| 45 | func _bct_emit_i64(buf: *u8, off: nx_int, cap: nx_int, n: i64) -> nx_int |
| 90 | func _bct_emit_byte(buf: *u8, off: nx_int, cap: nx_int, b: nx_int) -> nx_int |
| 97 | func _bct_emit_str(buf: *u8, off: nx_int, cap: nx_int, called by 1: nx_bc_emit_tsv_row |
| 118 | func nx_bc_emit_tsv_header(buf: *u8, cap: nx_int) -> nx_int |
| 240 | func _bct_emit_field(buf: *u8, off: nx_int, cap: nx_int, n: i64, sep: nx_int) -> nx_int |
| 246 | func nx_bc_emit_tsv_row(buf: *u8, cap: nx_int, called by 6: mainmain_run_scalemainmainmain calls 4: _bct_emit_str_bct_emit_byte_bct_emit_field_bct_emit_i64 |