nx_tissuebudget.nx
buildroot/runtime/nx_tissuebudget.nx
about
nx_tissuebudget.nx -- WHAT THE TISSUE TICK ACTUALLY COSTS, AGAINST THE BUDGET THAT WAS ALREADY BANKED.
WHY THIS EXISTS. knowledge/gamefeel_oracle.conf has carried frame_budget_ms_90hz 11..12 and js_block_ms
0..2 since the realism-oracles sweep, both cited to vendor VR performance guidance -- and NOTHING HAS EVER
MEASURED OURS AGAINST EITHER. The board says it plainly: a real-time claim with no measured frame cost is
a wish. This organ is the measurement, and it REFUSES rather than reporting a number nobody acts on.
THE SUBJECT IS THE RUNTIME SPRING, NOT THE XPBD CAGE. sb_tick_mob_gene is what runs every frame for every
girl in the browser; nx_softtissue's tet solver runs OFFLINE to identify the plant and never ships in the
frame loop. Measuring the cage here would price a cost the visitor never pays, which is the measured-a-
different-subject defect. The work unit is therefore ONE CAST TICK: TB_MOBS mobs x SB_PTS spring points.
THIS NUMBER IS A FLOOR AND IS LABELLED ONE. It is native x86 on the estate host. The shipped path is
WebAssembly in a visitor's browser, which is slower, on hardware that is very likely weaker. A floor is
still decisive in one direction: if the FLOOR already misses the budget the browser cannot make it, and
that is a refusal you can act on. It can never prove the browser fits, and this file does not claim it.
THE SAMPLE SIZE IS DERIVED FROM THE CLOCK, NOT CHOSEN. sys_clock_now_us resolves to 1 us, so a total
elapsed of T us carries ~1/T relative error on the per-tick figure. To resolve one part in
TB_RESOLVE_PERMIL the run must last at least TB_RESOLVE_PERMIL microseconds, so the loop DOUBLES its tick
count until it does. Below that it ABSTAINS instead of dividing a 0 into a per-tick cost of 0 -- the same
instrument-resolution trap nx_replyreserve refuses on the reply phase, where "0 ms" meant "under 1 ms".
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_softbind.nxnx_frame_budget.nxnx_oracleband_lib.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 30 | const TB_CONF: *u8 = "knowledge/gamefeel_oracle.conf\x00" |
| 31 | const TB_MOBS: i64 = 16 // the shipped cast: nx_wasm_craft MOB_CAP |
| 32 | const TB_FPS_VR: i64 = 90 // the rate frame_budget_ms_90hz is cited at |
| 33 | const TB_RESOLVE_PERMIL: i64 = 1000 // resolve the per-tick figure to one part in this many |
| 34 | const TB_TICKS0: i64 = 1024 // first attempt; DOUBLED until the run resolves |
| 35 | const TB_TICKS_CAP: i64 = 4194304 // refuse to spin forever: announced, never silent |
| 36 | const TB_WARM: i64 = 256 // seat + settle before timing, so page-in is not in the sample |
| 37 | const TB_MS_US: i64 = 1000 |
| 38 | const TB_GENE0: i64 = 305419896 // one fixed genome; the cost is per-point and genome-independent, |
functions
| 42 | func tb_one_tick(st: *i64, t: i64) -> i64 |
| 52 | func tb_run(ticks: i64) -> i64 |
| 67 | func tb_measure(out: *i64) -> i64 |
| 81 | func tb_ns_per_tick(elapsed_us: i64, ticks: i64) -> i64 { return elapsed_us*1000/ticks } called by 1: main |
| 83 | func main() -> i64 |