code wiki / (root) / nx_loadceil.nx

nx_loadceil.nx

buildroot/runtime/nx_loadceil.nx

4522 B89 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_loadceil.nx -- CLI for the build-admission load-ceiling calibrator (LV3, loadgov.plan, 2026-08-24). Thin main; the ruler is nx_loadceil_lib.lc_recommend so nx_loadceil_gate composes it in-process. nx_loadceil [report] [logpath] [confpath] Reads a resmon.log, splits beats by state=GREEN, prints the GREEN load1_centi distribution and RECOMMENDS max_centiload = (green load at loadceil-quantile-permil) / BA_HARD_FACTOR. Refuses below loadceil-min-green-samples. Arm by writing the value to build_admit.conf as max_centiload= (a conf value re-armed without a rebuild). exit 0 RECOMMENDED / 2 unreadable / 3 insufficient-history. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_loadceil_lib.nx nx_loadceil.nx

imports: nx_loadceil_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main lc_read sys_openat_rd sys_read sys_close lc_conf_num lc_line_num lc_slen lc_recommend lc_recommend_kv sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ lc_collect_kv lc_line_num ↻ lc_line_has lc_slen ↻ lc_sort lc_sift lc_quant lc_out lc_w lc_slen ↻ lc_num

structs

none

consts

none

functions

13func lc_w(fd: i64, s: *u8) -> i64 { let n: i64 = lc_slen(s); if n > 0 { sys_write(fd, s, n) } return 0 }
called by 1: lc_out calls 1: lc_slen
14func lc_out(s: *u8) -> i64 { return lc_w(1, s) }
called by 1: main calls 1: lc_w
15func lc_num(v0: i64) -> i64
called by 1: main
32func main(argc: i64, argv: *i64) -> i64