pub struct PatternStats {
pub pattern: String,
pub total_executions: u64,
pub total_matches: u64,
pub total_timeouts: u64,
pub avg_execution_time: f64,
pub max_execution_time: f64,
pub min_execution_time: f64,
pub recent_times: Vec<f64>,
pub last_anomaly_emitted_at: Option<f64>,
}Expand description
The per-pattern counters (PatternStats).
Fields§
§pattern: StringThe (truncated) pattern this row tracks.
total_executions: u64Every recorded execution of the pattern.
total_matches: u64Executions that matched.
total_timeouts: u64Executions that timed out.
avg_execution_time: f64The recent window’s average (0.0 until samples exist).
max_execution_time: f64The slowest non-timeout execution seen.
min_execution_time: f64The fastest non-timeout execution seen.
recent_times: Vec<f64>The recent execution times (the window is
max(min_samples, DEFAULT_RECENT_TIMES_WINDOW)).
last_anomaly_emitted_at: Option<f64>The last anomaly emission’s monotonic stamp (the cooldown key).
Trait Implementations§
Source§impl Clone for PatternStats
impl Clone for PatternStats
Auto Trait Implementations§
impl Freeze for PatternStats
impl RefUnwindSafe for PatternStats
impl Send for PatternStats
impl Sync for PatternStats
impl Unpin for PatternStats
impl UnsafeUnpin for PatternStats
impl UnwindSafe for PatternStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more