code wiki / _hdl_build / nx_libprobe.nx
nx_libprobe.nx
buildroot/runtime/_hdl_build/nx_libprobe.nx
about
nx_libprobe.nx -- one-shot diagnostic: Connection:close HTTP GET to <ip> <port> <path>, measuring
connect / time-to-FIRST-byte / time-to-CLOSE separately. The TTFB-vs-total split is the artifact test:
ttfb FAST + total ~20s => the body is fast and the ~20s is a keep-alive idle wait elsewhere (artifact)
ttfb ~20s => the server genuinely takes ~20s to produce the body (a real wedge)
Drains to CLOSE (never closes early) so it can't SIGPIPE-kill a SIGPIPE-naive daemon. SO_RCVTIMEO backstop.
usage: nx_libprobe <a.b.c.d> <port> <path>
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_sovjson_lib.nxnx_connect.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
| 11 | const K_MAGIC_65536: i64 = 65536 |
| 12 | const K_MAGIC_2000: i64 = 2000 |
| 13 | const K_MAGIC_18000: i64 = 18000 |
functions
| 15 | func lp_slen(s: *u8) -> i64 { return sj_vlen(s) } |
| 16 | func lp_w(s: *u8) -> i64 { return sys_write(1, s, lp_slen(s)) } |
| 17 | func lp_n(v: i64) -> i64 |
| 24 | func lp_atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c >= 48 { if c <= 57 { v = v*10 + (c-48) } } i = i + 1 } return v } called by 1: main |
| 26 | func lp_parse_ip(s: *u8, oct: *i64) -> i64 called by 1: main |
| 36 | func lp_addr(out: *u8, a: i64, b: i64, c: i64, d: i64, port: i64) -> i64 called by 1: main |
| 44 | func main(argc: i64, argv: *i64) -> i64 |