pub struct DistributedMonitor { /* private fields */ }Expand description
Advanced distributed monitoring system
Implementations§
Source§impl DistributedMonitor
impl DistributedMonitor
Sourcepub fn new(config: MonitoringConfig, is_coordinator: bool) -> Self
pub fn new(config: MonitoringConfig, is_coordinator: bool) -> Self
Create new distributed monitor
Sourcepub fn collect_system_metrics(&self) -> TorshResult<SystemMetrics>
pub fn collect_system_metrics(&self) -> TorshResult<SystemMetrics>
Collect current system metrics
Sourcepub fn collect_training_metrics(
&self,
current_loss: f32,
current_lr: f32,
epoch: u32,
batch: u32,
) -> TorshResult<TrainingMetrics>
pub fn collect_training_metrics( &self, current_loss: f32, current_lr: f32, epoch: u32, batch: u32, ) -> TorshResult<TrainingMetrics>
Collect current training metrics
Sourcepub fn collect_communication_metrics(&self) -> TorshResult<CommunicationMetrics>
pub fn collect_communication_metrics(&self) -> TorshResult<CommunicationMetrics>
Collect communication metrics
Sourcepub fn update_node_metrics(&self, params: NodeMetricsUpdate) -> TorshResult<()>
pub fn update_node_metrics(&self, params: NodeMetricsUpdate) -> TorshResult<()>
Update node metrics with comprehensive data
Sourcepub fn get_current_metrics(&self) -> TorshResult<Option<NodeMetrics>>
pub fn get_current_metrics(&self) -> TorshResult<Option<NodeMetrics>>
Get current node metrics
Sourcepub fn get_metrics_history(&self) -> TorshResult<Vec<NodeMetrics>>
pub fn get_metrics_history(&self) -> TorshResult<Vec<NodeMetrics>>
Get metrics history for trend analysis
Sourcepub fn get_active_alerts(&self) -> TorshResult<Vec<Alert>>
pub fn get_active_alerts(&self) -> TorshResult<Vec<Alert>>
Get all active alerts
Sourcepub fn get_cluster_summary(&self) -> TorshResult<ClusterSummary>
pub fn get_cluster_summary(&self) -> TorshResult<ClusterSummary>
Get cluster-wide metrics summary (for coordinators)
Sourcepub fn clear_resolved_alerts(&self) -> TorshResult<usize>
pub fn clear_resolved_alerts(&self) -> TorshResult<usize>
Clear resolved alerts
Sourcepub fn export_monitoring_data(&self) -> TorshResult<MonitoringExport>
pub fn export_monitoring_data(&self) -> TorshResult<MonitoringExport>
Export monitoring data for external analysis
Auto Trait Implementations§
impl Freeze for DistributedMonitor
impl RefUnwindSafe for DistributedMonitor
impl Send for DistributedMonitor
impl Sync for DistributedMonitor
impl Unpin for DistributedMonitor
impl UnsafeUnpin for DistributedMonitor
impl UnwindSafe for DistributedMonitor
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> 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> 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