code wiki / _hdl_build / nx_libprobe.nx

nx_libprobe.nx

buildroot/runtime/_hdl_build/nx_libprobe.nx

4608 B78 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_sovjson_lib.nx nx_connect.nx nx_syscalls.nx nx_libprobe.nx

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

main lp_w sys_write lp_slen sj_vlen sys_mmap lp_parse_ip lp_atoi lp_n sys_mmap ↻ sys_write ↻ sys_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_socket sys_set_socket_timeout sys_mmap ↻ sys_setsockopt sys_munmap lp_addr nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close sys_write ↻ sys_read

structs

none

consts

11const K_MAGIC_65536: i64 = 65536
12const K_MAGIC_2000: i64 = 2000
13const K_MAGIC_18000: i64 = 18000

functions

15func lp_slen(s: *u8) -> i64 { return sj_vlen(s) }
called by 1: lp_w calls 1: sj_vlen
16func lp_w(s: *u8) -> i64 { return sys_write(1, s, lp_slen(s)) }
called by 1: main calls 2: sys_writelp_slen
17func lp_n(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
24func 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
26func lp_parse_ip(s: *u8, oct: *i64) -> i64
called by 1: main
36func lp_addr(out: *u8, a: i64, b: i64, c: i64, d: i64, port: i64) -> i64
called by 1: main
44func main(argc: i64, argv: *i64) -> i64