pub struct MetricsCollector { /* private fields */ }Expand description
Metrics collector for tracking agent performance
Implementations§
Source§impl MetricsCollector
impl MetricsCollector
Sourcepub fn record_execution(&self, metrics: ExecutionMetrics)
pub fn record_execution(&self, metrics: ExecutionMetrics)
Record an execution
Sourcepub fn get_agent_stats(&self, agent_id: &str) -> Option<AgentStats>
pub fn get_agent_stats(&self, agent_id: &str) -> Option<AgentStats>
Get statistics for an agent
Sourcepub fn all_agent_stats(&self) -> Vec<AgentStats>
pub fn all_agent_stats(&self) -> Vec<AgentStats>
Get all agent statistics
Sourcepub fn all_executions(&self) -> Vec<ExecutionMetrics>
pub fn all_executions(&self) -> Vec<ExecutionMetrics>
Get all executions
Sourcepub fn get_agent_executions(&self, agent_id: &str) -> Vec<ExecutionMetrics>
pub fn get_agent_executions(&self, agent_id: &str) -> Vec<ExecutionMetrics>
Get executions for a specific agent
Sourcepub fn total_execution_count(&self) -> usize
pub fn total_execution_count(&self) -> usize
Get total execution count
Sourcepub fn total_findings_count(&self) -> u64
pub fn total_findings_count(&self) -> u64
Get total findings count
Sourcepub fn average_execution_time_ms(&self) -> f64
pub fn average_execution_time_ms(&self) -> f64
Get average execution time across all agents
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetricsCollector
impl RefUnwindSafe for MetricsCollector
impl Send for MetricsCollector
impl Sync for MetricsCollector
impl Unpin for MetricsCollector
impl UnwindSafe for MetricsCollector
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