code wiki / _hdl_build / nx_relay_loadprobe.nx
nx_relay_loadprobe.nx
buildroot/runtime/_hdl_build/nx_relay_loadprobe.nx
about
nx_relay_loadprobe.nx -- SOVEREIGN, on-demand performance probe of the relay's UDP media plane (operator
2026-07-06: "performance to state of the art FIRST"). No third-party tooling (no iperf/netem). Two UDP
members join a bench room; A blasts paced media frames, B receives the relay fan-out. BOTH ends share
THIS process's monotonic clock -> arrival - embedded_send_us = EXACT one-way A->relay->B latency through
the real relay code. Target defaults to 127.0.0.1 (measures RELAY SOFTWARE throughput -- is our CODE the
bottleneck, independent of network); argv[1]="lan" targets the NAS 192.168.8.227 for a real-hop run
(needs LAN reachability -- WSL NAT may block; the WAN leg is task 25). Per rate tier: latency
min/avg/p50/p95/max, jitter, loss, throughput. FAILS LOUD if unreachable. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_dgram_media.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 LP_MAGIC_8471: i64 = 8471 |
| 12 | const LP_MAGIC_4096: i64 = 4096 |
| 13 | const LP_MAGIC_2048: i64 = 2048 |
| 14 | const LP_MAGIC_65536: i64 = 65536 |
| 15 | const LP_MAGIC_1000000: i64 = 1000000 |
| 16 | const LP_MAGIC_250000: i64 = 250000 |
| 18 | const LP_MEDIA: i64 = 0x4D |
| 19 | const LP_FRAME: i64 = 1100 |
| 20 | const LP_MAXN: i64 = 2048 |
functions
| 22 | func lw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 23 | func ln(v: i64) -> i64 |
| 27 | func lms(us: i64) -> i64 { ln(us/1000); lw("." as *u8); let f: i64=(us%1000)/100; ln(f); lw("ms" as *u8); return 0 } |
| 28 | func lp_rd8(b: *u8) -> i64 { // NB: nx_cc x86 blanks .s on IMMEDIATE shifts >31 -> use a VARIABLE-shift loop called by 1: lp_record |
| 32 | func lp_naddr(a: *u8, lan: i64) -> i64 called by 1: main |
| 39 | func lp_tmo(fd: i64, sec: i64, usec: i64) -> i64 |
| 43 | func lp_join(fd: i64, naddr: *u8, id: *u8) -> i64 |
| 57 | func lp_record(rxm: *u8, fout: *u8, info: *i64, buf: *u8, r: i64, N: i64, seen: *u8, lat: *i64, st: *i64) -> i64 |
| 72 | func lp_tier(fda: i64, fdb: i64, naddr: *u8, ida: *u8, rate: i64, secs: i64) -> i64 |
| 138 | func main(argc: i64, argv: *i64) -> i64 |