code wiki / _hdl_build / nx_cms_cache_exceed_gate.nx

nx_cms_cache_exceed_gate.nx

buildroot/runtime/_hdl_build/nx_cms_cache_exceed_gate.nx

7094 B122 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic cms
docsdependenciesstructsconstsfunctions

about

nx_cms_cache_exceed_gate.nx -- W-RE-004 head-to-head EXCEED (caching-perf, PERF axis = the R4-P2 wrk-vs-nginx pattern, but with a SOVEREIGN deterministic metric: BODY BYTES TRANSFERRED, not wallclock). Serves the SAME unchanged resource K times: OURS = RFC 7232 conditional requests via nx_http_cache (ETag + If-None-Match -> 304, no body) INCUMBENT = no conditional-request support -> 200 + full body every time (the WP-default uncached path wp-super-cache exists to fix). Metric: total body bytes sent for K repeats of an unchanged page (LOWER wins). Correctness GUARD (the perf referee enforces it): OURS must 304 ONLY when unchanged and serve fresh 200 when the resource CHANGES -- a perf win bought by serving stale content is rejected. Verdict by nx_cms_exceed. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_cms_exceed.nx nx_http_cache.nx nx_syscalls.nx nx_cms_cache_exceed_gate.nx

imports: nx_cms_exceed.nxnx_http_cache.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap kx_cpy kx_etag sys_mmap ↻ nx_http_etag_compute nxc_fnv1a_64 nxc_put_hex_64 nx_http_if_none_match_matc xcd_verdict_perf kx_w sys_write kx_num sys_mmap ↻ sys_write ↻ xcd_vname kx_row kx_w ↻ kx_num ↻ xcd_referee_perf_ok kx_cat kx_catnum sys_mmap ↻ sys_openat_append sys_write ↻ sys_close sys_exit

structs

none

consts

15const KQ_REQUESTS: i64 = 100

functions

17func kx_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: kx_rowmain calls 1: sys_write
18func kx_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
called by 2: kx_rowmain calls 2: sys_mmapsys_write
19func kx_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var k: i64=0; while s[k]!=(0 as u8){dst[o]=s[k];o=o+1;k=k+1} return o }
called by 1: main
20func kx_catnum(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
25func kx_cpy(dst: *u8, src: *u8) -> i64 { var k: i64=0; while src[k]!=(0 as u8){dst[k]=src[k];k=k+1} return k }
called by 1: main
26func kx_row(id: i64, ok: i64, what: *u8) -> i64
called by 1: main calls 2: kx_wkx_num
34func kx_etag(body: *u8, bn: i64, etag: *u8) -> i64
called by 1: main calls 2: sys_mmapnx_http_etag_compute
41func main() -> i64