pub struct AnalysisThresholds {
pub high_cpu_percent: f64,
pub critical_cpu_percent: f64,
pub memory_pressure_ratio: f64,
pub critical_memory_ratio: f64,
pub restart_loop_count: u64,
pub deployment_error_threshold: u64,
pub resource_leak_memory_increase_pct: f64,
pub resource_leak_min_samples: u64,
pub high_network_bytes: u64,
pub critical_network_bytes: u64,
pub high_disk_bytes: u64,
pub critical_disk_bytes: u64,
}Expand description
Configurable thresholds for anomaly detection.
Fields§
§high_cpu_percent: f64CPU percentage above which a container is considered high CPU.
critical_cpu_percent: f64CPU percentage above which a container is critical.
memory_pressure_ratio: f64Memory usage ratio (usage/limit) above which a container is under pressure.
critical_memory_ratio: f64Memory usage ratio above which a container is critical.
restart_loop_count: u64Number of restarts indicating a restart loop.
deployment_error_threshold: u64Number of “die” events in recent history that indicate deployment failure.
resource_leak_memory_increase_pct: f64Memory usage increase percentage indicating a resource leak (e.g., 20 = 20% increase).
resource_leak_min_samples: u64Minimum number of metric samples needed to detect a trend.
high_network_bytes: u64Network I/O bytes above which a warning is issued (cumulative per sample).
critical_network_bytes: u64Network I/O bytes above which a critical alert is issued.
high_disk_bytes: u64Disk I/O bytes above which a warning is issued (cumulative per sample).
critical_disk_bytes: u64Disk I/O bytes above which a critical alert is issued.
Implementations§
Source§impl AnalysisThresholds
impl AnalysisThresholds
Sourcepub fn from_config(config: &DolConfig) -> Self
pub fn from_config(config: &DolConfig) -> Self
Build thresholds from a [DolConfig], falling back to defaults for unset fields.
Trait Implementations§
Source§impl Clone for AnalysisThresholds
impl Clone for AnalysisThresholds
Source§fn clone(&self) -> AnalysisThresholds
fn clone(&self) -> AnalysisThresholds
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnalysisThresholds
impl Debug for AnalysisThresholds
Auto Trait Implementations§
impl Freeze for AnalysisThresholds
impl RefUnwindSafe for AnalysisThresholds
impl Send for AnalysisThresholds
impl Sync for AnalysisThresholds
impl Unpin for AnalysisThresholds
impl UnsafeUnpin for AnalysisThresholds
impl UnwindSafe for AnalysisThresholds
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more