nx_race_visualizer.nx
buildroot/runtime/nx_race_visualizer.nx
about
nx_race_visualizer.nx -- ASCII visualizer for .race_telemetry.tsv.
User directive 2026-05-16: "i want visualization with a manual and
scheduled and automatic capbility flag".
Reads a TSV buffer (.race_telemetry.tsv contents) + a length, then
emits a horizontal bar chart of race-counts per timing-mode + a
verdict-tally summary. All output is ASCII; no terminal escapes.
TSV schema (timing_mode column 9 ADDED 2026-05-16 four-pillar slice):
col 0 = timestamp (ISO 8601)
col 1 = event_type (lap | grader | bench | ...)
col 2 = bench_name
col 3 = lap_n (i64)
col 4 = duration_ms (i64)
col 5 = verdict (WIN | TIE | LOSE | RECORD_ONLY | SKIP | INFO)
col 6 = thermal_c
col 7 = notes
col 8 = timing_mode (MANUAL | EVENT | SCHEDULED | CONTINUOUS |
IDLE | THRESHOLD | PROBABILISTIC | QUORUM)
-- absent in old rows; default MANUAL
Per cardinal user-owns-every-bit: caller supplies the TSV bytes;
substrate doesn't read the filesystem on its own.
nx_capability_claims:
needs: [tsv_bytes, sys_write]
provides: [race_visualization]
safety: [no_unchecked_deref, no_floating_point, no_syscall_other_than_write,
bit_equal_reproducible, kind_isolated]
license: ORIGINAL
kind: racing_crew_specialist
dependencies 2 imports · 1 importers
imports: nx_race_timing.nxnx_syscalls_x86_64.nx
imported by: nx_race_visualizer_test.nx
structs
| none |
consts
| 43 | const NXV_FD_STDOUT: i64 = 1 |
functions
| 47 | func nxv_strlen(s: *u8) -> i64 called by 1: nxv_emit |
| 53 | func nxv_emit(s: *u8) -> i64 |
| 59 | func nxv_emit_n(s: *u8, n: i64) -> i64 |
| 67 | func nxv_emit_i64(v: i64) -> i64 called by 1: nx_race_visualize |
| 96 | func nxv_emit_padded(name: *u8, name_len: i64, width: i64) -> i64 called by 1: nx_race_visualize |
| 107 | func nxv_emit_repeat(ch: *u8, n: i64) -> i64 called by 1: nx_race_visualize |
| 120 | func nxv_eol(buf: *u8, len: i64, off: i64) -> i64 called by 1: nx_race_visualize |
| 131 | func nxv_tab(buf: *u8, end: i64, off: i64) -> i64 called by 1: nxv_col |
| 143 | func nxv_col(buf: *u8, line_end: i64, line_start: i64, k: i64, |
| 167 | func nx_race_visualize(tsv: *u8, len: i64) -> i64 |