Skip to main content

PoolStats

Struct PoolStats 

Source
pub struct PoolStats {
    pub hits: u64,
    pub misses: u64,
    pub evictions: u64,
    pub frames_total: usize,
    pub peak_pins: u32,
    pub sync_data_calls: u64,
    pub sync_full_calls: u64,
    pub dirty_pages_flushed: u64,
}

Fields§

§hits: u64§misses: u64§evictions: u64§frames_total: usize

Total frames the pool reserved at open – its CAPACITY, not its residency. The region is allocated once and never grown, so this is the anonymous memory the pool holds from open onward whether or not the frames are populated.

It was called frames_used, and that name cost a reviewer a false finding: 170 MB “used” against a 5 MB database reads as an accounting bug rather than as a preallocated arena working exactly as designed. A number that invites a wrong inference is a reporting defect even when the arithmetic is right. See also a_full_scan_pins_one_leaf_at_a_time in btree.rs, which independently found this field cannot move and so cannot be asserted on for any specific operation – peak_pins is the field for that.

§peak_pins: u32§sync_data_calls: u64

Barriers actually placed by flush_all, counted at the point they are issued rather than where they are chosen. Asserting on what a caller like Store::checkpoint passed would only prove it passed something – these live here because this is where the syscall actually happens, so a caller that silently ignored its own argument could not still make the test pass.

§sync_full_calls: u64§dirty_pages_flushed: u64

Dirty frames written by flush_all (monotonic since pool construction).

Trait Implementations§

Source§

impl Clone for PoolStats

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PoolStats

Source§

impl Debug for PoolStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PoolStats

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.