pub struct MonitorConfig {
pub max_metrics: usize,
pub sampling_interval: Duration,
pub memory_threshold_mb: f64,
pub execution_time_threshold_sec: f64,
pub enable_profiling: bool,
pub enable_tracing: bool,
}Expand description
Monitor configuration
Fields§
§max_metrics: usizeMaximum number of metrics to retain
sampling_interval: DurationSampling interval for continuous metrics
memory_threshold_mb: f64Memory usage threshold for anomaly detection (MB)
execution_time_threshold_sec: f64Execution time threshold for anomaly detection (seconds)
enable_profiling: boolEnable detailed profiling
enable_tracing: boolEnable distributed tracing
Implementations§
Source§impl MonitorConfig
impl MonitorConfig
Sourcepub fn max_metrics(self, max: usize) -> Self
pub fn max_metrics(self, max: usize) -> Self
Set maximum metrics retention
Sourcepub fn sampling_interval(self, interval: Duration) -> Self
pub fn sampling_interval(self, interval: Duration) -> Self
Set sampling interval
Sourcepub fn memory_threshold_mb(self, threshold: f64) -> Self
pub fn memory_threshold_mb(self, threshold: f64) -> Self
Set memory threshold
Sourcepub fn enable_profiling(self, enable: bool) -> Self
pub fn enable_profiling(self, enable: bool) -> Self
Enable profiling
Sourcepub fn enable_tracing(self, enable: bool) -> Self
pub fn enable_tracing(self, enable: bool) -> Self
Enable tracing
Trait Implementations§
Source§impl Clone for MonitorConfig
impl Clone for MonitorConfig
Source§fn clone(&self) -> MonitorConfig
fn clone(&self) -> MonitorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MonitorConfig
impl Debug for MonitorConfig
Auto Trait Implementations§
impl Freeze for MonitorConfig
impl RefUnwindSafe for MonitorConfig
impl Send for MonitorConfig
impl Sync for MonitorConfig
impl Unpin for MonitorConfig
impl UnwindSafe for MonitorConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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