pub struct TimerObservabilitySnapshot { /* private fields */ }Expand description
Epoch-scoped outcomes, counters, and performance for one timer.
Implementations§
Source§impl TimerObservabilitySnapshot
impl TimerObservabilitySnapshot
Sourcepub fn new(epoch: TimerEpoch) -> Self
pub fn new(epoch: TimerEpoch) -> Self
Begin empty observation state for one runtime epoch.
Sourcepub fn begin_epoch(&mut self, epoch: TimerEpoch)
pub fn begin_epoch(&mut self, epoch: TimerEpoch)
Replace all epoch-scoped observations with a new empty epoch.
This resets outcomes, timestamps, the expected-failure streak, counters, and performance aggregates. Persistent scheduling state is owned outside this observation value.
Sourcepub const fn record_completion(
&mut self,
completion: TimerCompletion,
completed_at_ns: u64,
measurement: Option<TimerMeasurement>,
)
pub const fn record_completion( &mut self, completion: TimerCompletion, completed_at_ns: u64, measurement: Option<TimerMeasurement>, )
Record one returned callback atomically across outcome and counters.
Performance changes only when a valid end measurement is supplied.
Sourcepub const fn record_interruption(&mut self, observed_at_ns: u64)
pub const fn record_interruption(&mut self, observed_at_ns: u64)
Record an interruption in the epoch where it becomes observable.
Sourcepub const fn record_request(&mut self)
pub const fn record_request(&mut self)
Record a validated schedule or reconciliation request.
Sourcepub const fn record_arm(&mut self)
pub const fn record_arm(&mut self)
Record an actual one-shot provider arm.
Sourcepub const fn record_start(&mut self)
pub const fn record_start(&mut self)
Record a non-stale callback entering logical execution.
Sourcepub const fn record_cancellation(&mut self)
pub const fn record_cancellation(&mut self)
Record a logical cancellation that wins arbitration.
Sourcepub const fn record_stale(&mut self)
pub const fn record_stale(&mut self)
Record a provider callback or completion rejected as stale.
Sourcepub const fn record_coalesced(&mut self)
pub const fn record_coalesced(&mut self)
Record scheduling demand merged into existing work.
Sourcepub const fn epoch(self) -> TimerEpoch
pub const fn epoch(self) -> TimerEpoch
Return the observation epoch.
Sourcepub const fn outcomes(self) -> TimerOutcomeSnapshot
pub const fn outcomes(self) -> TimerOutcomeSnapshot
Return latest outcomes and functional failure state.
Sourcepub const fn counters(self) -> TimerCounters
pub const fn counters(self) -> TimerCounters
Return epoch-local event counters.
Sourcepub const fn performance(self) -> TimerPerformance
pub const fn performance(self) -> TimerPerformance
Return completed callback performance aggregates.
Sourcepub const fn consecutive_expected_failures(self) -> u64
pub const fn consecutive_expected_failures(self) -> u64
Return functional expected-failure state without rebuilding a snapshot.
Trait Implementations§
Source§impl Clone for TimerObservabilitySnapshot
impl Clone for TimerObservabilitySnapshot
Source§fn clone(&self) -> TimerObservabilitySnapshot
fn clone(&self) -> TimerObservabilitySnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more