code wiki / (root) / nx_frame_pacing_gate.nx

nx_frame_pacing_gate.nx

buildroot/runtime/nx_frame_pacing_gate.nx

11580 B185 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind gate/prooftopic frame
docsdependenciesstructsconstsfunctions

about

nx_frame_pacing_gate.nx -- THE PACING REFEREE (gameengine GE15 pf_referee + GE32 perf_frame, 2026-09-02). Two subjects in one gate, both through nx_perf_lib (the ONE frame-budget ruler the wasm engine, the served HUD, the telemetry sink and this gate all share): (1) the RULER: nearest-rank percentiles, spike count, worst-ever and over-budget counters, the ring window, the clamp and the self-heal -- exact fixtures whose answers are arithmetic, plus a referee over synthetic traces with a planted stall (the anti-vacuity tooth: a referee that passes the stall is not a referee). (2) the LIVE WINDOW: the latest frametrace- plane row for the beach world (written by nx_world_telemetry from a real visitor's beacon) judged against knowledge/frame_pacing.conf -- a NAMED SKIP through gv_need when either is absent, never a green. The plane is read through nx_frame_pacing_lib (fpc_plane_latest / fpc_row_frames), the same reader the sink's peers use; no file format of its own. Bands are conf rows, never literals here. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_gate_verdict.nx nx_frame_pacing_lib.nx nx_frame_pacing_gate.nx

imports: nx_gate_verdict.nxnx_frame_pacing_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_head gv_puts sys_write gv_ctr sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_subjects gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_need gv_puts ↻ fp_region gv_check gv_puts ↻ pf_pct pf_hist pf_tail_rank pf_spikes pf_pct ↻ pf_worst_ever pf_referee pf_pct ↻ pf_spikes_permil

structs

none

consts

16const FP_WORLD: *u8 = "beach"
17const FP_WORLD_N: i64 = 5
18const FP_REGION_BYTES: i64 = 10120 // PF_WORDS x 8 = 1265 x 8
19const FP_ROW_CAP: i64 = 8192
20const FP_SUBJECTS: i64 = 1 // live windows judged
22const FP_FIX_STEADY_MS: i64 = 10
23const FP_FIX_STEADY_N: i64 = 100
24const FP_FIX_STALL_MS: i64 = 40
25const FP_FIX_STALL_N: i64 = 10
26const FP_FIX_BUDGET_MS: i64 = 24
27const FP_FIX_RAMP_N: i64 = 100
28const FP_FIX_WRAP_N: i64 = 300
29const FP_FIX_WRAP_MOD: i64 = 50
30const FP_FIX_HUGE_MS: i64 = 5000
31const FP_FIX_GARBAGE: i64 = 999999
32const FP_TRACE_60HZ_MS: i64 = 16
33const FP_TRACE_N: i64 = 600
34const FP_TRACE_STALL_EVERY: i64 = 10
35const FP_TRACE_SHORT_N: i64 = 30
36const FP_60: i64 = 60
37const FP_30: i64 = 30
38const FP_BUDGET_60_MS: i64 = 16
39const FP_BUDGET_30_MS: i64 = 33
40const FP_CSV_FIX_N: i64 = 5
41const FP_SHORT_ROW: i64 = 20

functions

43func fp_region() -> *i64 { return sys_mmap(FP_REGION_BYTES) as *i64 }
called by 1: main
45func main(argc: i64, argv: *i64) -> i64