pub struct StatsSnapshot {Show 16 fields
pub tx_packets: u64,
pub tx_bytes: u64,
pub tx_dropped: u64,
pub tx_errors: u64,
pub rx_packets: u64,
pub rx_bytes: u64,
pub rx_dropped: u64,
pub rx_errors: u64,
pub nat_translations: u64,
pub nat_fast_path_hits: u64,
pub nat_slow_path_lookups: u64,
pub nat_connections_created: u64,
pub nat_connections_expired: u64,
pub poll_iterations: u64,
pub poll_work_done: u64,
pub poll_busy_spins: u64,
}Expand description
A point-in-time snapshot of datapath statistics.
Fields§
§tx_packets: u64Total packets transmitted.
tx_bytes: u64Total bytes transmitted.
tx_dropped: u64TX packets dropped.
tx_errors: u64TX errors.
rx_packets: u64Total packets received.
rx_bytes: u64Total bytes received.
rx_dropped: u64RX packets dropped.
rx_errors: u64RX errors.
nat_translations: u64NAT translations performed.
nat_fast_path_hits: u64NAT fast path hits.
nat_slow_path_lookups: u64NAT slow path lookups.
nat_connections_created: u64NAT connections created.
nat_connections_expired: u64NAT connections expired.
poll_iterations: u64Poll iterations.
poll_work_done: u64Poll work done.
poll_busy_spins: u64Poll busy spins.
Implementations§
Source§impl StatsSnapshot
impl StatsSnapshot
Sourcepub const fn total_packets(&self) -> u64
pub const fn total_packets(&self) -> u64
Returns the total packets (TX + RX).
Sourcepub const fn total_bytes(&self) -> u64
pub const fn total_bytes(&self) -> u64
Returns the total bytes (TX + RX).
Sourcepub fn nat_hit_rate(&self) -> f64
pub fn nat_hit_rate(&self) -> f64
Returns the NAT fast path hit rate (0.0 - 1.0).
Sourcepub fn poll_efficiency(&self) -> f64
pub fn poll_efficiency(&self) -> f64
Returns the poll efficiency (ratio of iterations with work).
Trait Implementations§
Source§impl Clone for StatsSnapshot
impl Clone for StatsSnapshot
Source§fn clone(&self) -> StatsSnapshot
fn clone(&self) -> StatsSnapshot
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 moreimpl Copy for StatsSnapshot
Source§impl Debug for StatsSnapshot
impl Debug for StatsSnapshot
Source§impl Default for StatsSnapshot
impl Default for StatsSnapshot
Source§fn default() -> StatsSnapshot
fn default() -> StatsSnapshot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StatsSnapshot
impl RefUnwindSafe for StatsSnapshot
impl Send for StatsSnapshot
impl Sync for StatsSnapshot
impl Unpin for StatsSnapshot
impl UnsafeUnpin for StatsSnapshot
impl UnwindSafe for StatsSnapshot
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