pub struct HealthMonitorStats {
pub ticks: AtomicU64,
pub replacements_initiated: AtomicU64,
pub replacements_failed: AtomicU64,
pub backoff_skips: AtomicU64,
pub consecutive_failures: Mutex<Vec<u32>>,
pub last_tick_at: Mutex<Option<Instant>>,
}Expand description
Runtime counters surfaced to operator tooling. Atomic fields so reads from CLI / Deck panels are wait-free.
Fields§
§ticks: AtomicU64Number of poll ticks the monitor has completed since
spawn. Increments after each pass over the group’s
replicas, regardless of how many were unhealthy.
replacements_initiated: AtomicU64Number of LifecycleGroup::replace calls initiated.
replacements_failed: AtomicU64Number of replace attempts that failed (factory
returned a daemon whose on_start errored, or the slot
index went out of bounds mid-respawn). Operators
detecting persistent failures should consult this.
backoff_skips: AtomicU64Number of poll ticks where the monitor skipped a known-
unhealthy replica because exponential backoff hadn’t
elapsed yet. Counts every (tick × skipped-replica)
combination; operators reading the per-index backoff
state should consult consecutive_failures.
consecutive_failures: Mutex<Vec<u32>>Per-replica-index consecutive-failure counter. Bumped
each tick the replica is still unhealthy after a
replace attempt; reset to 0 when the replica reports
healthy. The 2^consecutive_failures shift drives the
next-retry-tick computation (capped at
MAX_BACKOFF_SHIFT).
last_tick_at: Mutex<Option<Instant>>Instant of the most recent poll tick, recorded after
each pass. None until the first tick lands.