Skip to main content

Metrics

Struct Metrics 

Source
pub struct Metrics { /* private fields */ }
Expand description

Runtime metrics

Are not stored durably, so metrics will reset after a restart/crash.

Implementations§

Source§

impl Metrics

Source

pub fn cache_stats(&self, size_bytes: u64, capacity_bytes: u64) -> CacheStats

Builds a CacheStats snapshot from the cumulative cache counters and the caller-supplied live cache size_bytes / capacity_bytes (the block cache owns its occupancy, Metrics owns the hit / miss tallies).

Source

pub fn table_file_cache_hit_rate(&self) -> f64

Returns the cache hit rate for file descriptors in percent (0.0 - 1.0).

Source

pub fn data_block_io(&self) -> u64

Number of I/O data block bytes transferred from disk or OS page cache.

Source

pub fn index_block_io(&self) -> u64

Number of I/O index block bytes transferred from disk or OS page cache.

Source

pub fn filter_block_io(&self) -> u64

Number of I/O filter block bytes transferred from disk or OS page cache.

Source

pub fn range_tombstone_block_io(&self) -> u64

Number of I/O range tombstone block bytes transferred from disk or OS page cache.

Source

pub fn block_io(&self) -> u64

Number of I/O block bytes transferred from disk or OS page cache.

Source

pub fn data_block_load_count(&self) -> usize

Number of data blocks that were accessed.

Source

pub fn index_block_load_count(&self) -> usize

Number of index blocks that were accessed.

Source

pub fn filter_block_load_count(&self) -> usize

Number of filter blocks that were accessed.

Source

pub fn range_tombstone_block_load_count(&self) -> usize

Number of range tombstone blocks that were accessed.

Source

pub fn ecc_auto_heal_scheduled_count(&self) -> usize

Number of SSTs scheduled for a healing recompaction after a persistent ECC correction on read (auto_heal enabled).

Source

pub fn ecc_secded_corrected_count(&self) -> usize

On-read blocks healed by the SEC-DED single-bit fast path.

Source

pub fn ecc_shard_recovered_count(&self) -> usize

On-read blocks recovered from Reed-Solomon shard parity.

Source

pub fn ecc_recovered_count(&self) -> usize

Total on-read ECC recoveries across both mechanisms (SEC-DED + RS shard). A scrapeable latent-bit-rot signal: growth here means the medium is returning faulty bytes that parity is silently repairing.

Source

pub fn block_load_io_count(&self) -> usize

Number of blocks that were loaded from disk or OS page cache.

Source

pub fn data_block_load_cached_count(&self) -> usize

Number of data blocks that were served from block cache.

Source

pub fn index_block_load_cached_count(&self) -> usize

Number of index blocks that were served from block cache.

Source

pub fn filter_block_load_cached_count(&self) -> usize

Number of filter blocks that were served from block cache.

Source

pub fn range_tombstone_block_load_cached_count(&self) -> usize

Number of range tombstone blocks that were served from block cache.

Source

pub fn block_load_cached_count(&self) -> usize

Number of blocks that were served from block cache.

Source

pub fn block_loads(&self) -> usize

Number of blocks that were accessed.

Source

pub fn data_block_cache_hit_rate(&self) -> f64

Data block cache efficiency in percent (0.0 - 1.0).

Source

pub fn filter_block_cache_hit_rate(&self) -> f64

Filter block cache efficiency in percent (0.0 - 1.0).

Source

pub fn index_block_cache_hit_rate(&self) -> f64

Index block cache efficiency in percent (0.0 - 1.0).

Source

pub fn range_tombstone_block_cache_hit_rate(&self) -> f64

Range tombstone block cache efficiency in percent (0.0 - 1.0).

Source

pub fn block_cache_hit_rate(&self) -> f64

Block cache efficiency in percent (0.0 - 1.0).

Source

pub fn filter_efficiency(&self) -> f64

Filter efficiency in percent (0.0 - 1.0).

Represents the ratio of I/O operations avoided due to filter.

Source

pub fn filter_queries(&self) -> usize

Number of filter queries performed.

Source

pub fn io_skipped_by_filter(&self) -> usize

Number of I/O operations skipped by filter.

Source

pub fn prefix_bloom_skips(&self) -> usize

Number of segments skipped during Tree::create_prefix scans by prefix bloom filters (single-table and multi-table run paths).

Note: BlobTree prefix scans do not currently record this metric.

Trait Implementations§

Source§

impl Debug for Metrics

Source§

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

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

impl Default for Metrics

Source§

fn default() -> Metrics

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V