pub struct PoolStatsSnapshot {
pub hits: usize,
pub misses: usize,
pub checked_out: usize,
pub peak_checked_out: usize,
pub bytes_checked_out: usize,
pub peak_bytes_checked_out: usize,
}Expand description
Immutable snapshot of pool statistics.
§Example
use santh_bufpool::{BufferPool, PoolConfig, PoolStatsSnapshot};
let pool = BufferPool::new(PoolConfig::default());
let snap = pool.stats().snapshot();
assert_eq!(snap.checked_out, 0);Fields§
§hits: usizeNumber of pool hits (reuse).
misses: usizeNumber of pool misses (fallback alloc).
checked_out: usizeCurrently checked out.
peak_checked_out: usizePeak simultaneous checkouts.
bytes_checked_out: usizeTotal bytes currently checked out.
peak_bytes_checked_out: usizePeak bytes checked out simultaneously.
Trait Implementations§
Source§impl Clone for PoolStatsSnapshot
impl Clone for PoolStatsSnapshot
Source§fn clone(&self) -> PoolStatsSnapshot
fn clone(&self) -> PoolStatsSnapshot
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 PoolStatsSnapshot
impl Debug for PoolStatsSnapshot
impl Copy for PoolStatsSnapshot
Auto Trait Implementations§
impl Freeze for PoolStatsSnapshot
impl RefUnwindSafe for PoolStatsSnapshot
impl Send for PoolStatsSnapshot
impl Sync for PoolStatsSnapshot
impl Unpin for PoolStatsSnapshot
impl UnsafeUnpin for PoolStatsSnapshot
impl UnwindSafe for PoolStatsSnapshot
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