pub struct ServerMetrics {
pub active_connections: u64,
pub total_accepted: u64,
pub total_rejected: u64,
pub total_timed_out: u64,
pub total_requests: u64,
pub bytes_in: u64,
pub bytes_out: u64,
}Expand description
Snapshot of server metrics at a point in time.
Returned by TcpServer::metrics(). All counters are monotonically
increasing except active_connections which reflects the current gauge.
Fields§
§active_connections: u64Current number of active (in-flight) connections.
total_accepted: u64Total connections accepted since server start.
total_rejected: u64Total connections rejected due to connection limit.
total_timed_out: u64Total requests that timed out.
total_requests: u64Total requests served since server start.
bytes_in: u64Total bytes read from clients.
bytes_out: u64Total bytes written to clients.
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 · 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 PartialEq for ServerMetrics
impl PartialEq for ServerMetrics
impl Eq for ServerMetrics
impl StructuralPartialEq for ServerMetrics
Auto Trait Implementations§
impl Freeze for ServerMetrics
impl RefUnwindSafe for ServerMetrics
impl Send for ServerMetrics
impl Sync for ServerMetrics
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).