pub struct DbStats {
pub expired_count: u64,
pub operations_count: u64,
pub size_bytes: usize,
pub hot_state_objects: usize,
pub cold_state_trajectories: usize,
pub cold_state_buffer_bytes: usize,
pub memory_usage_bytes: usize,
}Expand description
Database statistics
Fields§
§expired_count: u64Number of items that have expired
operations_count: u64Total number of operations performed
size_bytes: usizeTotal size in bytes (approximate)
hot_state_objects: usizeTotal number of objects currently tracked in hot state
cold_state_trajectories: usizeNumber of trajectories stored in cold state
cold_state_buffer_bytes: usizeBytes used in cold state buffer
memory_usage_bytes: usizeApproximate total memory usage in bytes
Implementations§
Source§impl DbStats
impl DbStats
pub fn new() -> Self
pub fn record_operation(&mut self)
pub fn record_expired(&mut self, count: u64)
pub fn set_size_bytes(&mut self, bytes: usize)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DbStats
impl<'de> Deserialize<'de> for DbStats
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DbStats
impl RefUnwindSafe for DbStats
impl Send for DbStats
impl Sync for DbStats
impl Unpin for DbStats
impl UnwindSafe for DbStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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