code wiki / _hdl_build / nx_apistack_metrics.nx
nx_apistack_metrics.nx
buildroot/runtime/_hdl_build/nx_apistack_metrics.nx
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
imports: nx_syscalls.nx
imported by: nx_apistack_metrics_gate.nx
structs
| none |
consts
| none |
functions
| 7 | func mx_inc(counters: *i64, id: i64) -> i64 { counters[id] = counters[id] + 1; return counters[id] } called by 1: main |
| 8 | func mx_add(counters: *i64, id: i64, delta: i64) -> i64 { counters[id] = counters[id] + delta; return counters[id] } called by 1: main |
| 9 | func mx_get(counters: *i64, id: i64) -> i64 { return counters[id] } called by 1: main |
| 12 | func mx_emit(counters: *i64, names: *i64, n: i64, out: *u8) -> i64 |