Public declaration syntax from forge-rs/crates/forge-health/src/monitoring.rs Original source SHA-256: a26b0e13aa8ba93e40eee45b6da4ebcfc38765c7e21b8a7bc3358e9c1e083318 Function bodies and constant values are omitted. This is not the complete implementation. Source line 81 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct HealthThresholds { /// Maximum acceptable error rate in errors per minute. /// /// When the computed error rate exceeds this threshold, the agent's /// health status becomes `Degraded` or `Critical`. pub max_error_rate: f64, /// Maximum acceptable CPU usage percentage (0.0 to 100.0). /// /// When CPU usage exceeds this threshold, the agent's health status /// becomes `Degraded`. pub max_cpu_percent: f64, /// Maximum acceptable memory usage in bytes. /// /// When memory usage exceeds this threshold, the agent's health status /// becomes `Critical`. pub max_memory_bytes: u64, /// Maximum acceptable inference latency in milliseconds. /// /// This threshold is informational — it is reported in the health status /// reasons but does not directly cause status changes since latency is /// not tracked in the profile (it would require per-call timing). pub max_inference_latency_ms: u64 } Source line 147 #[derive(Debug, Clone)] pub struct HealthMonitor { } Source line 175 pub fn new(thresholds: HealthThresholds) -> Self; Source line 196 pub fn profile(&self) -> &HealthProfile; Source line 218 pub fn profile_mut(&mut self) -> &mut HealthProfile; Source line 236 pub fn thresholds(&self) -> &HealthThresholds; Source line 278 pub fn check_health(&self) -> HealthStatus;