code wiki / _hdl_build / nx_uiq_perf.nx

nx_uiq_perf.nx

buildroot/runtime/_hdl_build/nx_uiq_perf.nx

7273 B157 linesdepth 6pulls 7 transitivereach 1 importersview sourcekind tooltopic uiq
docsdependenciesstructsconstsfunctions

about

nx_uiq_perf.nx -- CLI: DETERMINISTIC Core-Web-Vitals STATIC predictor (the quantitative guardrail). Computes, from a page's source, the render-path costs that CWV field metrics punish -- WITHOUT a render: * render-blocking external stylesheets (<link rel=stylesheet>, not preload) -> delays FCP/LCP * render-blocking scripts (<script src> without async/defer) -> blocks parse, hurts INP/TBT * unsized media (<img>/<video> missing width or height) -> CLS risk (>0.1 fails) * page source weight (bytes) -> transfer proxy Reuses the nx_uiq_* family lib (DRY: io + syscalls) -- the second consumer of nx_uiq_color, growing the family. usage: nx_uiq_perf --kat | <html-file-path> -> JSON {bytes,blocking_css,blocking_js,unsized_media,issues,verdict} HONEST ENVELOPE: STATIC predictors of LCP<=2.5s / INP<=200ms / CLS<=0.1 (web.dev/vitals, p75). Measured LCP/INP/CLS + Speed Index need a real render + field RUM (browser-lane / CDP). This flags the source-visible causes; a PASS here is necessary, not sufficient. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 1 importers

nx_uiq_color.nx nx_uiq_perf.nx nx_uiq_perf_gate.nx

imports: nx_uiq_color.nx

imported by: nx_uiq_perf_gate.nx

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

main uiq_w sys_write uiq_perf_selftest perf_blocking_css perf_tagend perf_has_in perf_blocking_js perf_tagend ↻ perf_has_in ↻ perf_unsized_img perf_tagend ↻ perf_has_in ↻ perf_audit perf_blocking_css ↻ perf_blocking_js ↻ perf_unsized_img ↻ uiq_w ↻ uiq_pn sys_mmap sys_write ↻ uiq_pn ↻ perf_slurp sys_read perf_audit ↻

structs

none

consts

13const K_MAGIC_2097152: i64 = 2097152

functions

16func perf_has_in(buf: *u8, a: i64, b: i64, pat: *u8) -> i64
29func perf_tagend(buf: *u8, n: i64, off: i64) -> i64
35func perf_unsized_img(buf: *u8, n: i64) -> i64
52func perf_blocking_js(buf: *u8, n: i64) -> i64
71func perf_blocking_css(buf: *u8, n: i64) -> i64
88func perf_audit(buf: *u8, n: i64, emit: i64) -> i64
107func uiq_perf_selftest() -> i64
128func perf_slurp(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 1: sys_read
138func main(argc: i64, argv: *i64) -> i64