pub struct Statistics {Show 26 fields
pub record_count: AtomicU32,
pub memory_usage: AtomicUsize,
pub disk_usage: AtomicU64,
pub total_gets: AtomicU64,
pub total_inserts: AtomicU64,
pub total_updates: AtomicU64,
pub total_deletes: AtomicU64,
pub total_range_queries: AtomicU64,
pub get_latency_ns: AtomicU64,
pub insert_latency_ns: AtomicU64,
pub delete_latency_ns: AtomicU64,
pub cache_hits: AtomicU64,
pub cache_misses: AtomicU64,
pub cache_evictions: AtomicU64,
pub cache_memory: AtomicUsize,
pub writes_buffered: AtomicU64,
pub writes_flushed: AtomicU64,
pub write_failures: AtomicU64,
pub flush_count: AtomicU64,
pub disk_reads: AtomicU64,
pub disk_writes: AtomicU64,
pub disk_bytes_read: AtomicU64,
pub disk_bytes_written: AtomicU64,
pub key_not_found_errors: AtomicU64,
pub out_of_memory_errors: AtomicU64,
pub io_errors: AtomicU64,
}
Expand description
Central statistics hub for FeoxStore
Fields§
§record_count: AtomicU32
§memory_usage: AtomicUsize
§disk_usage: AtomicU64
§total_gets: AtomicU64
§total_inserts: AtomicU64
§total_updates: AtomicU64
§total_deletes: AtomicU64
§total_range_queries: AtomicU64
§get_latency_ns: AtomicU64
§insert_latency_ns: AtomicU64
§delete_latency_ns: AtomicU64
§cache_hits: AtomicU64
§cache_misses: AtomicU64
§cache_evictions: AtomicU64
§cache_memory: AtomicUsize
§writes_buffered: AtomicU64
§writes_flushed: AtomicU64
§write_failures: AtomicU64
§flush_count: AtomicU64
§disk_reads: AtomicU64
§disk_writes: AtomicU64
§disk_bytes_read: AtomicU64
§disk_bytes_written: AtomicU64
§key_not_found_errors: AtomicU64
§out_of_memory_errors: AtomicU64
§io_errors: AtomicU64
Implementations§
Source§impl Statistics
impl Statistics
pub fn new() -> Self
Sourcepub fn record_get(&self, latency_ns: u64, hit: bool)
pub fn record_get(&self, latency_ns: u64, hit: bool)
Record a get operation
Sourcepub fn record_insert(&self, latency_ns: u64, is_update: bool)
pub fn record_insert(&self, latency_ns: u64, is_update: bool)
Record an insert operation
Sourcepub fn record_delete(&self, latency_ns: u64)
pub fn record_delete(&self, latency_ns: u64)
Record a delete operation
Sourcepub fn record_range_query(&self)
pub fn record_range_query(&self)
Record a range query
Sourcepub fn record_eviction(&self, count: u64)
pub fn record_eviction(&self, count: u64)
Record cache eviction
Sourcepub fn record_write_buffered(&self)
pub fn record_write_buffered(&self)
Record write buffer operation
pub fn record_write_flushed(&self, count: u64)
pub fn record_write_failed(&self)
Sourcepub fn record_disk_read(&self, bytes: u64)
pub fn record_disk_read(&self, bytes: u64)
Record disk I/O
pub fn record_disk_write(&self, bytes: u64)
Sourcepub fn record_error(&self, error: &FeoxError)
pub fn record_error(&self, error: &FeoxError)
Record errors
Sourcepub fn snapshot(&self) -> StatsSnapshot
pub fn snapshot(&self) -> StatsSnapshot
Get a snapshot of current statistics
Trait Implementations§
Source§impl Debug for Statistics
impl Debug for Statistics
Auto Trait Implementations§
impl !Freeze for Statistics
impl RefUnwindSafe for Statistics
impl Send for Statistics
impl Sync for Statistics
impl Unpin for Statistics
impl UnwindSafe for Statistics
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