code wiki / _hdl_build / nx_vroom_loadtest.nx

nx_vroom_loadtest.nx

buildroot/runtime/_hdl_build/nx_vroom_loadtest.nx

5814 B96 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind tooltopic vroom
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_connect.nx nx_http_client.nx nx_vroom_loadtest.nx

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

main sys_mmap nx_http_client_sockaddr_ip lp sys_write post_once sys_socket nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap nx_http_client_build_reque nx_dec_emit_u63 sl sys_write ↻ sys_read ln2 sys_mmap ↻ sys_write ↻ sys_exit sys_now_us sys_mmap ↻ sys_clock_gettime_mono get_once sys_socket ↻ nx_connect_bounded ↻ sys_close ↻ sys_set_socket_timeout ↻ sys_mmap ↻ nx_http_client_build_reque hc_put_caps sys_mmap ↻ nx_codec_caps_headers sys_mmap ↻

structs

none

consts

11const K_MAGIC_4096: i64 = 4096
12const K_MAGIC_8446: i64 = 8446
13const K_MAGIC_20000: i64 = 20000
14const K_MAGIC_8192: i64 = 8192
15const K_MAGIC_131072: i64 = 131072
16const K_MAGIC_1000000: i64 = 1000000

functions

18func lp(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 1: main calls 1: sys_write
19func 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 }
called by 1: main calls 2: sys_mmapsys_write
20func sl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: post_onceget_once
24func post_once(addr: *u8, path: *u8, body: *u8, blen: i64, req: *u8, out: *u8, cap: i64) -> i64
37func get_once(addr: *u8, path: *u8, out: *u8, cap: i64) -> i64
50func main() -> i64