#[non_exhaustive]pub struct IoMetricsSnapshot {Show 16 fields
pub read_backpressure: u64,
pub write_backpressure: u64,
pub read_backpressure_active: usize,
pub write_backpressure_active: usize,
pub read_backpressure_time: Duration,
pub write_backpressure_time: Duration,
pub read_buffered: usize,
pub read_buffers_held: usize,
pub read_buffer_capacity: usize,
pub write_buffered: usize,
pub bytes_read: u64,
pub bytes_written: u64,
pub eager_writes: u64,
pub eager_writes_partial: u64,
pub scheduled_writes: u64,
pub closed: CloseStats,
}Expand description
A snapshot of IoMetrics.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.read_backpressure: u64Number of times read backpressure was enabled.
write_backpressure: u64Number of times write backpressure was enabled.
read_backpressure_active: usizeConnections with read backpressure enabled.
write_backpressure_active: usizeConnections with write backpressure enabled.
read_backpressure_time: DurationTotal connection-time spent under read backpressure.
write_backpressure_time: DurationTotal connection-time spent under write backpressure.
read_buffered: usizeBytes held in read buffers.
read_buffers_held: usizeConnections that keep a read buffer allocated.
Read buffers are released once their input is consumed, so a connection is counted while it holds unconsumed input, such as the start of a frame that has not fully arrived. A snapshot mostly counts idle connections waiting for the rest of their input, busy ones are only briefly counted. A buffer a transport holds for a pending read, as with io-uring, is not counted.
read_buffer_capacity: usizeBytes allocated by the read buffers of
read_buffers_held, a whole page for a
pooled buffer.
Compared with read_buffered it shows the
memory kept for small leftover input. Frames split off a read buffer
share its allocation and can keep it alive after it is released, that
memory is not counted.
write_buffered: usizeBytes held in write buffers or taken by the transport but not written.
bytes_read: u64Bytes read from transports.
bytes_written: u64Bytes written to transports.
eager_writes: u64Writes started in place because buffered output reached the write
buffer threshold, see IoConfig::set_write_buf_threshold().
eager_writes_partial: u64Eager writes that could not write all buffered output, the rest is left to the write task.
scheduled_writes: u64Writes left to the write task, below the write buffer threshold or with eager writes disabled. The io-uring transport always uses the write task.
closed: CloseStatsClosed connections by reason.
Trait Implementations§
Source§impl Clone for IoMetricsSnapshot
impl Clone for IoMetricsSnapshot
Source§fn clone(&self) -> IoMetricsSnapshot
fn clone(&self) -> IoMetricsSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for IoMetricsSnapshot
Source§impl Debug for IoMetricsSnapshot
impl Debug for IoMetricsSnapshot
Source§impl Default for IoMetricsSnapshot
impl Default for IoMetricsSnapshot
Source§fn default() -> IoMetricsSnapshot
fn default() -> IoMetricsSnapshot
impl Eq for IoMetricsSnapshot
Source§impl PartialEq for IoMetricsSnapshot
impl PartialEq for IoMetricsSnapshot
impl StructuralPartialEq for IoMetricsSnapshot
Auto Trait Implementations§
impl Freeze for IoMetricsSnapshot
impl RefUnwindSafe for IoMetricsSnapshot
impl Send for IoMetricsSnapshot
impl Sync for IoMetricsSnapshot
impl Unpin for IoMetricsSnapshot
impl UnsafeUnpin for IoMetricsSnapshot
impl UnwindSafe for IoMetricsSnapshot
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.