pub struct PerformanceMonitor {
pub metrics: RuntimeMetrics,
pub intervals: Vec<MonitoringInterval>,
pub thresholds: PerformanceThresholds,
pub alert_handlers: Vec<AlertHandler>,
}Expand description
Runtime performance monitor
Fields§
§metrics: RuntimeMetricsPerformance metrics
intervals: Vec<MonitoringInterval>Monitoring intervals
thresholds: PerformanceThresholdsPerformance thresholds
alert_handlers: Vec<AlertHandler>Alert handlers
Implementations§
Source§impl PerformanceMonitor
impl PerformanceMonitor
Sourcepub fn new() -> PerformanceMonitor
pub fn new() -> PerformanceMonitor
Create a new performance monitor
Sourcepub fn start_monitoring(&mut self)
pub fn start_monitoring(&mut self)
Start performance monitoring
Sourcepub fn stop_monitoring(&mut self)
pub fn stop_monitoring(&mut self)
Stop performance monitoring
Sourcepub fn get_metrics(&self) -> &RuntimeMetrics
pub fn get_metrics(&self) -> &RuntimeMetrics
Get current performance metrics
Sourcepub fn check_thresholds(&self) -> Vec<AlertType>
pub fn check_thresholds(&self) -> Vec<AlertType>
Check if performance thresholds are exceeded
Trait Implementations§
Source§impl Clone for PerformanceMonitor
impl Clone for PerformanceMonitor
Source§fn clone(&self) -> PerformanceMonitor
fn clone(&self) -> PerformanceMonitor
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 PerformanceMonitor
impl Debug for PerformanceMonitor
Source§impl Default for PerformanceMonitor
impl Default for PerformanceMonitor
Source§fn default() -> PerformanceMonitor
fn default() -> PerformanceMonitor
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PerformanceMonitor
impl<'de> Deserialize<'de> for PerformanceMonitor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PerformanceMonitor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PerformanceMonitor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PerformanceMonitor
impl PartialEq for PerformanceMonitor
Source§impl Serialize for PerformanceMonitor
impl Serialize for PerformanceMonitor
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PerformanceMonitor
Auto Trait Implementations§
impl Freeze for PerformanceMonitor
impl RefUnwindSafe for PerformanceMonitor
impl Send for PerformanceMonitor
impl Sync for PerformanceMonitor
impl Unpin for PerformanceMonitor
impl UnwindSafe for PerformanceMonitor
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.