code wiki / (root) / nx_bench_companion_tsv_parse.nx

nx_bench_companion_tsv_parse.nx

buildroot/runtime/nx_bench_companion_tsv_parse.nx

7963 B224 linesdepth 6pulls 10 transitivereach 1 importersview sourcekind benchtopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_companion_tsv_parse.nx -- read bench TSV rows back from bytes. Sibling to [[nx_bench_companion_tsv]] (the emitter). Closes the persistence loop: rows written by the emitter can be read back from disk + paired-diffed without re-running any measurement. Format contract (must match the emitter): label<TAB>n_actors<TAB>completed<TAB>...<TAB>verdict<LF> 20 columns total: label + 19 counter fields. API: nx_bc_parse_tsv_row(buf, buf_len, out_label, out_label_cap, out_label_len, out_report) -> bytes_consumed (>=0; offset just past trailing LF) or NEGATIVE structured verdict Substrate-honest: parser refuses malformed input (missing fields, non-decimal chars, label overflow) at the boundary rather than silently filling out_report with junk.

dependencies 4 imports · 1 importers

nx_syscalls.nx nx_tier.nx nx_bench_companion.nx nx_bench_companion_tsv.nx nx_bench_companion_tsv_parse.n nx_bench_companion_tsv_parse_test.

imports: nx_syscalls.nxnx_tier.nxnx_bench_companion.nxnx_bench_companion_tsv.nx

imported by: nx_bench_companion_tsv_parse_test.nx

structs

none

consts

29const NX_BCTP_OK: nx_int = 0
30const NX_BCTP_NULL_BUF: nx_int = 1
31const NX_BCTP_NULL_REPORT: nx_int = 2
32const NX_BCTP_MALFORMED_TAB: nx_int = 3
33const NX_BCTP_MALFORMED_LF: nx_int = 4
34const NX_BCTP_BAD_DECIMAL: nx_int = 5
35const NX_BCTP_LABEL_OVERFLOW: nx_int = 6
36const NX_BCTP_TOO_SHORT: nx_int = 7
37const NX_BCTP_INVALID: nx_int = 8
38const NX_BCTP_N: nx_int = 9

functions

40func nx_bctp_v_is_valid(v: nx_int) -> nx_int
called by 1: main
48func _bctp_is_digit(b: u8) -> nx_int
called by 1: _bctp_parse_dec
59func _bctp_find(buf: *u8, off: nx_int, end: nx_int, sep: nx_int) -> nx_int
74func _bctp_parse_dec(buf: *u8, off: nx_int, end_excl: nx_int,
103func _bctp_consume_field_i64(buf: *u8, off: nx_int, end: nx_int,
114func nx_bc_parse_tsv_row(buf: *u8, buf_len: nx_int,