Public declaration syntax from forge-rs/crates/forge-health/src/latency.rs Original source SHA-256: fe1d0e2f65667dda00a76de970eb7c2688ec3a2c21bd5828a624d587008ee16a Function bodies and constant values are omitted. This is not the complete implementation. Source line 70 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct LatencyStats { /// Total number of operations in the window. pub total_count: u64, /// Number of successful operations in the window. pub success_count: u64, /// Number of failed operations in the window. pub failure_count: u64, /// Success rate as a fraction (0.0 to 1.0). Zero if no operations recorded. pub success_rate: f64, /// Mean latency in microseconds across all operations in the window. /// Zero if no operations recorded. pub mean_latency_us: f64, /// P50 (median) latency in microseconds. Zero if no operations recorded. pub p50_latency_us: u64, /// P95 latency in microseconds. Zero if no operations recorded. pub p95_latency_us: u64, /// P99 latency in microseconds. Zero if no operations recorded. pub p99_latency_us: u64, /// Maximum latency observed in the window in microseconds. pub max_latency_us: u64, /// Minimum latency observed in the window in microseconds. /// Zero if no operations recorded. pub min_latency_us: u64 } Source line 111 pub fn empty() -> Self; Source line 153 #[derive(Debug, Clone)] pub struct LatencyTracker { } Source line 180 pub fn new(window_size: usize) -> Self; Source line 207 pub fn record_success(&mut self, latency_us: u64); Source line 229 pub fn record_failure(&mut self, latency_us: u64); Source line 258 pub fn stats(&self) -> LatencyStats; Source line 307 pub fn len(&self) -> usize; Source line 312 pub fn is_empty(&self) -> bool; Source line 317 pub fn capacity(&self) -> usize; Source line 322 pub fn clear(&mut self);