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
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
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
structs
| none |
consts
| 15 | const KQ_REQUESTS: i64 = 100 |
functions
| 17 | func 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 } |
| 18 | func 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 } |
| 19 | func 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 |
| 20 | func kx_catnum(dst: *u8, off: i64, v: i64) -> i64 |
| 25 | func 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 |
| 26 | func kx_row(id: i64, ok: i64, what: *u8) -> i64 |
| 34 | func kx_etag(body: *u8, bn: i64, etag: *u8) -> i64 |
| 41 | func main() -> i64 |