nx_progress_watchdog.nx
buildroot/runtime/nx_progress_watchdog.nx
about
nx_progress_watchdog.nx -- detects stalled phases in long ingest runs.
A heartbeat-based liveness monitor: caller heartbeats at progress
points; check() reports STALLED if too much wall-clock has elapsed
since the last heartbeat. Lightweight: zero syscalls per heartbeat
(just stores the timestamp); one clock read per check.
genealogy_id: ibm_360_watchdog_timer + os_softdog_1990s
lineage_id: liveness_monitor
dependencies 3 imports · 3 importers
imports: nx_syscalls.nxnx_tier.nxnx_clock.nx
imported by: nx_ingest_runner.nxnx_ingest_runner_test.nxnx_progress_watchdog_test.nx
structs
| 24 | struct NxWatchdog |
consts
| 21 | const NX_WATCHDOG_OK: nx_int = 0 |
| 22 | const NX_WATCHDOG_STALLED: nx_int = 1 |
functions
| 31 | func nx_progress_watchdog_new(stall_timeout_ms: nx_int) -> *NxWatchdog |
| 41 | func nx_progress_watchdog_heartbeat(w: *NxWatchdog) -> nx_int |
| 47 | func nx_progress_watchdog_check(w: *NxWatchdog) -> nx_int |
| 57 | func nx_progress_watchdog_elapsed_ms(w: *NxWatchdog) -> nx_int |
| 63 | func nx_progress_watchdog_n_heartbeats(w: *NxWatchdog) -> nx_int { return w.n_heartbeats } called by 1: main |
| 64 | func nx_progress_watchdog_n_stalls(w: *NxWatchdog) -> nx_int { return w.n_stalls_detected } called by 1: main |
| 65 | func nx_progress_watchdog_stall_timeout_ms(w: *NxWatchdog) -> nx_int { return w.stall_timeout_ns / NX_NS_PER_MS } called by 1: main |