code wiki / _hdl_build / nx_metrics.nx

nx_metrics.nx

buildroot/runtime/_hdl_build/nx_metrics.nx

5510 B122 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_metrics.nx -- CLI over the sovereign metrics ring (nx_metrics_ring). Query daemon health HISTORY + uptime SLO from the bounded binary TSDB. `put` injects a sample (used by the gate for deterministic proof; the live writer is nx_metrics_sampler). nx_heal forks this for its MCP uptime/history verbs. nx_metrics uptime <ring> <name> <window_sec> -> "<name> uptime <permille>/1000 over <w>s (n=<samples>)" nx_metrics history <ring> <name> [n] -> recent samples: <ts> <verdict> fails=<f> nx_metrics count <ring> -> total records stored nx_metrics put <ring> <name> <verdict> <fails> <ts>-> append one sample (deterministic) license_tier: ORIGINAL module: nishi-core.ops.metrics_cli

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_metrics_ring.nx nx_metrics.nx

imports: nx_syscalls.nxnx_metrics_ring.nx

imported by: nobody (leaf or entry point)

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

main mc_p sys_write mc_streq mr_hash mr_append sys_openat_rdwr sys_mmap mr_pread sys_lseek sys_read mr_geti mr_puti mr_pwrite sys_lseek ↻ sys_write ↻ sys_close sys_munmap mc_atoi sys_openat_rd sys_mmap ↻ mc_pn sys_mmap ↻ sys_write ↻ mr_count mr_pread ↻ mr_geti ↻ sys_close ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real mr_pread ↻ mr_geti ↻ mr_uptime sys_openat_rd ↻ sys_mmap ↻ mr_count ↻ sys_close ↻ mr_pread ↻ mr_geti ↻

structs

none

consts

none

functions

12func mc_p(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
13func mc_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
23func mc_streq(a: *u8, b: *u8) -> i64
called by 1: main
29func mc_atoi(s: *u8) -> i64
called by 1: main
34func mc_vname(v: i64) -> *u8
called by 1: main
41func main(argc: i64, argv: *i64) -> i64