pub struct ServerMetrics {
pub total_requests: u64,
pub requests_by_endpoint: HashMap<String, u64>,
pub requests_by_status: HashMap<u16, u64>,
pub avg_response_time_ms: f64,
pub p95_response_time_ms: f64,
pub p99_response_time_ms: f64,
pub active_connections: usize,
pub bytes_sent: u64,
pub bytes_received: u64,
pub error_rate: f32,
pub uptime_seconds: u64,
}Expand description
Server metrics
Fields§
§total_requests: u64Total requests handled
requests_by_endpoint: HashMap<String, u64>Requests by endpoint
requests_by_status: HashMap<u16, u64>Requests by status code
avg_response_time_ms: f64Average response time in milliseconds
p95_response_time_ms: f6495th percentile response time
p99_response_time_ms: f6499th percentile response time
active_connections: usizeCurrent active connections
bytes_sent: u64Total bytes sent
bytes_received: u64Total bytes received
error_rate: f32Error rate (0.0 - 1.0)
uptime_seconds: u64Uptime in seconds
Trait Implementations§
Source§impl Clone for ServerMetrics
impl Clone for ServerMetrics
Source§fn clone(&self) -> ServerMetrics
fn clone(&self) -> ServerMetrics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServerMetrics
impl Debug for ServerMetrics
Source§impl Default for ServerMetrics
impl Default for ServerMetrics
Source§fn default() -> ServerMetrics
fn default() -> ServerMetrics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServerMetrics
impl<'de> Deserialize<'de> for ServerMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ServerMetrics
impl RefUnwindSafe for ServerMetrics
impl Send for ServerMetrics
impl Sync for ServerMetrics
impl Unpin for ServerMetrics
impl UnsafeUnpin for ServerMetrics
impl UnwindSafe for ServerMetrics
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