nx_bench_companion_tsv_parse.nx
buildroot/runtime/nx_bench_companion_tsv_parse.nx
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
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
| 29 | const NX_BCTP_OK: nx_int = 0 |
| 30 | const NX_BCTP_NULL_BUF: nx_int = 1 |
| 31 | const NX_BCTP_NULL_REPORT: nx_int = 2 |
| 32 | const NX_BCTP_MALFORMED_TAB: nx_int = 3 |
| 33 | const NX_BCTP_MALFORMED_LF: nx_int = 4 |
| 34 | const NX_BCTP_BAD_DECIMAL: nx_int = 5 |
| 35 | const NX_BCTP_LABEL_OVERFLOW: nx_int = 6 |
| 36 | const NX_BCTP_TOO_SHORT: nx_int = 7 |
| 37 | const NX_BCTP_INVALID: nx_int = 8 |
| 38 | const NX_BCTP_N: nx_int = 9 |
functions
| 40 | func nx_bctp_v_is_valid(v: nx_int) -> nx_int called by 1: main |
| 48 | func _bctp_is_digit(b: u8) -> nx_int called by 1: _bctp_parse_dec |
| 59 | func _bctp_find(buf: *u8, off: nx_int, end: nx_int, sep: nx_int) -> nx_int |
| 74 | func _bctp_parse_dec(buf: *u8, off: nx_int, end_excl: nx_int, |
| 103 | func _bctp_consume_field_i64(buf: *u8, off: nx_int, end: nx_int, |
| 114 | func nx_bc_parse_tsv_row(buf: *u8, buf_len: nx_int, |