code wiki / (root) / nx_daemon_bench_test.nx

nx_daemon_bench_test.nx

buildroot/runtime/nx_daemon_bench_test.nx

6548 B153 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic daemon
docsdependenciesstructsconstsfunctions

about

nx_daemon_bench_test.nx -- smoke: drive the daemon through every state transition and verify each one. We do NOT actually sleep -- this is a smoke, not a soak. We feed synthetic measurements that exercise: 1. IDLE -> WARMING during warmup_cycles 2. WARMING -> HEALTHY after warmup 3. HEALTHY -> DEGRADED when |z| crosses 3-sigma 4. DEGRADED -> REGRESSION when |z| crosses 5-sigma 5. OVERBUDGET path when we synthesise a budget violation 6. Cardinal compliance: REGRESSION without named_improvement = 0 7. Cardinal compliance: REGRESSION with named_improvement = 1 8. Sealed-enum validity predicate accepts 0..7, rejects 8 / -1 All eight assertions must pass. Any failure returns a unique non- zero exit code so debugging is one bisection.

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_clock.nx nx_tier.nx nx_benchmark_harness.nx nx_daemon_bench.nx nx_daemon_bench_test.nx

imports: nx_syscalls.nxnx_clock.nxnx_tier.nxnx_benchmark_harness.nxnx_daemon_bench.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_daemon_config_defaults nx_daemon_alloc sys_mmap ↻ nx_daemon_init _config_snapshot _axis_stats_zero_all _axis_stats_zero _zero_cycle_state nx_daemon_cycle_start nx_clock_monotonic_ns sys_mmap ↻ sys_clock_gettime_mono nx_daemon_record_sample nx_benchmark_axis_index_is _axis_at _record_to_axis _axis_zscore_q10 _isqrt _axis_welford_update _axis_ema_update nx_daemon_cycle_end nx_clock_monotonic_ns ↻ _finalise_cycle _band_to_status _worst_band _worst_z _axis_at ↻ nx_daemon_is_cardinal_comp nx_daemon_set_named_improv nx_daemon_status_is_valid nx_daemon_emit_summary print sys_write strlen print_i64 sys_mmap ↻ itoa sys_mmap ↻

structs

none

consts

none

functions

24func main() -> nx_int {