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
impl Metrics
Sourcepub fn cache_stats(&self, size_bytes: u64, capacity_bytes: u64) -> CacheStats
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).
Sourcepub fn table_file_cache_hit_rate(&self) -> f64
pub fn table_file_cache_hit_rate(&self) -> f64
Returns the cache hit rate for file descriptors in percent (0.0 - 1.0).
Sourcepub fn data_block_io(&self) -> u64
pub fn data_block_io(&self) -> u64
Number of I/O data block bytes transferred from disk or OS page cache.
Sourcepub fn index_block_io(&self) -> u64
pub fn index_block_io(&self) -> u64
Number of I/O index block bytes transferred from disk or OS page cache.
Sourcepub fn filter_block_io(&self) -> u64
pub fn filter_block_io(&self) -> u64
Number of I/O filter block bytes transferred from disk or OS page cache.
Sourcepub fn range_tombstone_block_io(&self) -> u64
pub fn range_tombstone_block_io(&self) -> u64
Number of I/O range tombstone block bytes transferred from disk or OS page cache.
Sourcepub fn block_io(&self) -> u64
pub fn block_io(&self) -> u64
Number of I/O block bytes transferred from disk or OS page cache.
Sourcepub fn data_block_load_count(&self) -> usize
pub fn data_block_load_count(&self) -> usize
Number of data blocks that were accessed.
Sourcepub fn index_block_load_count(&self) -> usize
pub fn index_block_load_count(&self) -> usize
Number of index blocks that were accessed.
Sourcepub fn filter_block_load_count(&self) -> usize
pub fn filter_block_load_count(&self) -> usize
Number of filter blocks that were accessed.
Sourcepub fn range_tombstone_block_load_count(&self) -> usize
pub fn range_tombstone_block_load_count(&self) -> usize
Number of range tombstone blocks that were accessed.
Sourcepub fn ecc_auto_heal_scheduled_count(&self) -> usize
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).
Sourcepub fn ecc_secded_corrected_count(&self) -> usize
pub fn ecc_secded_corrected_count(&self) -> usize
On-read blocks healed by the SEC-DED single-bit fast path.
Sourcepub fn ecc_shard_recovered_count(&self) -> usize
pub fn ecc_shard_recovered_count(&self) -> usize
On-read blocks recovered from Reed-Solomon shard parity.
Sourcepub fn ecc_recovered_count(&self) -> usize
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.
Sourcepub fn block_load_io_count(&self) -> usize
pub fn block_load_io_count(&self) -> usize
Number of blocks that were loaded from disk or OS page cache.
Sourcepub fn data_block_load_cached_count(&self) -> usize
pub fn data_block_load_cached_count(&self) -> usize
Number of data blocks that were served from block cache.
Sourcepub fn index_block_load_cached_count(&self) -> usize
pub fn index_block_load_cached_count(&self) -> usize
Number of index blocks that were served from block cache.
Sourcepub fn filter_block_load_cached_count(&self) -> usize
pub fn filter_block_load_cached_count(&self) -> usize
Number of filter blocks that were served from block cache.
Sourcepub fn range_tombstone_block_load_cached_count(&self) -> usize
pub fn range_tombstone_block_load_cached_count(&self) -> usize
Number of range tombstone blocks that were served from block cache.
Sourcepub fn block_load_cached_count(&self) -> usize
pub fn block_load_cached_count(&self) -> usize
Number of blocks that were served from block cache.
Sourcepub fn block_loads(&self) -> usize
pub fn block_loads(&self) -> usize
Number of blocks that were accessed.
Sourcepub fn data_block_cache_hit_rate(&self) -> f64
pub fn data_block_cache_hit_rate(&self) -> f64
Data block cache efficiency in percent (0.0 - 1.0).
Sourcepub fn filter_block_cache_hit_rate(&self) -> f64
pub fn filter_block_cache_hit_rate(&self) -> f64
Filter block cache efficiency in percent (0.0 - 1.0).
Sourcepub fn index_block_cache_hit_rate(&self) -> f64
pub fn index_block_cache_hit_rate(&self) -> f64
Index block cache efficiency in percent (0.0 - 1.0).
Sourcepub fn range_tombstone_block_cache_hit_rate(&self) -> f64
pub fn range_tombstone_block_cache_hit_rate(&self) -> f64
Range tombstone block cache efficiency in percent (0.0 - 1.0).
Sourcepub fn block_cache_hit_rate(&self) -> f64
pub fn block_cache_hit_rate(&self) -> f64
Block cache efficiency in percent (0.0 - 1.0).
Sourcepub fn filter_efficiency(&self) -> f64
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.
Sourcepub fn filter_queries(&self) -> usize
pub fn filter_queries(&self) -> usize
Number of filter queries performed.
Sourcepub fn io_skipped_by_filter(&self) -> usize
pub fn io_skipped_by_filter(&self) -> usize
Number of I/O operations skipped by filter.
Sourcepub fn prefix_bloom_skips(&self) -> usize
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§
Auto Trait Implementations§
impl !Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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