pub struct StorageMetrics {Show 17 fields
pub put_count: u64,
pub get_count: u64,
pub has_count: u64,
pub delete_count: u64,
pub get_hits: u64,
pub get_misses: u64,
pub bytes_written: u64,
pub bytes_read: u64,
pub avg_put_latency_us: u64,
pub avg_get_latency_us: u64,
pub avg_has_latency_us: u64,
pub peak_put_latency_us: u64,
pub peak_get_latency_us: u64,
pub error_count: u64,
pub batch_op_count: u64,
pub batch_items_count: u64,
pub avg_batch_size: u64,
}Expand description
Storage operation metrics
Fields§
§put_count: u64Total number of put operations
get_count: u64Total number of get operations
has_count: u64Total number of has operations
delete_count: u64Total number of delete operations
get_hits: u64Total number of successful gets (cache hits + disk hits)
get_misses: u64Total number of failed gets (not found)
bytes_written: u64Total bytes written
bytes_read: u64Total bytes read
avg_put_latency_us: u64Average put latency in microseconds
avg_get_latency_us: u64Average get latency in microseconds
avg_has_latency_us: u64Average has latency in microseconds
peak_put_latency_us: u64Peak put latency in microseconds
peak_get_latency_us: u64Peak get latency in microseconds
error_count: u64Number of errors encountered
batch_op_count: u64Total number of batch operations (put_many, get_many, etc.)
batch_items_count: u64Total number of items in batch operations
avg_batch_size: u64Average batch size (items per batch)
Implementations§
Source§impl StorageMetrics
impl StorageMetrics
Sourcepub fn cache_hit_rate(&self) -> f64
pub fn cache_hit_rate(&self) -> f64
Calculate cache hit rate (0.0 to 1.0)
Sourcepub fn avg_operation_latency_us(&self) -> u64
pub fn avg_operation_latency_us(&self) -> u64
Calculate average operation latency
Sourcepub fn ops_per_second(&self, duration: Duration) -> f64
pub fn ops_per_second(&self, duration: Duration) -> f64
Calculate throughput in operations per second
Sourcepub fn batch_efficiency(&self) -> f64
pub fn batch_efficiency(&self) -> f64
Calculate batch efficiency (percentage of operations that were batched)
Sourcepub fn write_throughput_bps(&self, duration: Duration) -> f64
pub fn write_throughput_bps(&self, duration: Duration) -> f64
Calculate write throughput in bytes per second
Sourcepub fn read_throughput_bps(&self, duration: Duration) -> f64
pub fn read_throughput_bps(&self, duration: Duration) -> f64
Calculate read throughput in bytes per second
Trait Implementations§
Source§impl Clone for StorageMetrics
impl Clone for StorageMetrics
Source§fn clone(&self) -> StorageMetrics
fn clone(&self) -> StorageMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StorageMetrics
impl Debug for StorageMetrics
Source§impl Default for StorageMetrics
impl Default for StorageMetrics
Source§fn default() -> StorageMetrics
fn default() -> StorageMetrics
Source§impl<'de> Deserialize<'de> for StorageMetrics
impl<'de> Deserialize<'de> for StorageMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for StorageMetrics
impl RefUnwindSafe for StorageMetrics
impl Send for StorageMetrics
impl Sync for StorageMetrics
impl Unpin for StorageMetrics
impl UnwindSafe for StorageMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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