code wiki / _hdl_build / nx_vroom_loadtest.nx
nx_vroom_loadtest.nx
buildroot/runtime/_hdl_build/nx_vroom_loadtest.nx
about
nx_vroom_loadtest.nx -- REAL load-test of the LIVE daemon (operator: "i dont think you have really
measured live performance for optimization"). Hammers a RUNNING nx_vroom_daemon on 127.0.0.1:8446
with real frame-sized POSTs over the sovereign HTTP client + measures the ACHIEVED throughput:
posts/sec, per-frame latency (us), and a /frames relay round-trip. On localhost there is NO network
RTT, so this ISOLATES the daemon's compute ceiling -- if the daemon sustains >>30fps here, the live
9fps is NOT the daemon (it's the client encode / uplink bandwidth / TCP-over-150ms-RTT). Frame =
20KB (384x288 JPEG @Q0.5 ~ this size). license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_connect.nxnx_http_client.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
| 11 | const K_MAGIC_4096: i64 = 4096 |
| 12 | const K_MAGIC_8446: i64 = 8446 |
| 13 | const K_MAGIC_20000: i64 = 20000 |
| 14 | const K_MAGIC_8192: i64 = 8192 |
| 15 | const K_MAGIC_131072: i64 = 131072 |
| 16 | const K_MAGIC_1000000: i64 = 1000000 |
functions
| 18 | func lp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 19 | func ln2(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;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 } |
| 20 | func sl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 24 | func post_once(addr: *u8, path: *u8, body: *u8, blen: i64, req: *u8, out: *u8, cap: i64) -> i64 called by 1: main calls 8: sys_socketnx_connect_boundedsys_closesys_set_socket_timeoutnx_http_client_build_request_postsl+2 |
| 37 | func get_once(addr: *u8, path: *u8, out: *u8, cap: i64) -> i64 called by 1: main calls 9: sys_socketnx_connect_boundedsys_closesys_set_socket_timeoutsys_mmapnx_http_client_build_request+3 |
| 50 | func main() -> i64 |