code wiki / _hdl_build / nx_apistack_metrics.nx

nx_apistack_metrics.nx

buildroot/runtime/_hdl_build/nx_apistack_metrics.nx

1599 B26 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic apistack
docsdependenciesstructsconstsfunctions

about

nx_apistack_metrics.nx -- CAP-API-METRICS: request/action counters for /api observability, emitted to the deterministic status snapshot (Prometheus-style text). Pure INTEGER counters (no float, no external agent = the sovereign exceed over StatsD/Prometheus scrapers). Counters live in a caller-held array (the daemon), indexed by a stable metric id; mx_emit serializes "<name> <count>\n" for the snapshot / /api/metrics. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_apistack_metrics.nx nx_apistack_metrics_gate.nx

imports: nx_syscalls.nx

imported by: nx_apistack_metrics_gate.nx

structs

none

consts

none

functions

7func mx_inc(counters: *i64, id: i64) -> i64 { counters[id] = counters[id] + 1; return counters[id] }
called by 1: main
8func mx_add(counters: *i64, id: i64, delta: i64) -> i64 { counters[id] = counters[id] + delta; return counters[id] }
called by 1: main
9func mx_get(counters: *i64, id: i64) -> i64 { return counters[id] }
called by 1: main
12func mx_emit(counters: *i64, names: *i64, n: i64, out: *u8) -> i64
called by 1: main calls 1: sys_mmap