pub struct PersistenceStats {
pub snapshots_saved: u64,
pub snapshots_loaded: u64,
pub total_entries_saved: usize,
pub total_entries_loaded: usize,
pub total_bytes_written: u64,
pub total_bytes_read: u64,
pub last_save_duration: Duration,
pub last_load_duration: Duration,
pub save_failures: u64,
pub load_failures: u64,
pub incremental_updates: u64,
pub compression_ratio: f64,
}Expand description
Persistence statistics
Fields§
§snapshots_saved: u64Number of snapshots saved
snapshots_loaded: u64Number of snapshots loaded
total_entries_saved: usizeTotal entries saved
total_entries_loaded: usizeTotal entries loaded
total_bytes_written: u64Total bytes written
total_bytes_read: u64Total bytes read
last_save_duration: DurationLast save duration
last_load_duration: DurationLast load duration
save_failures: u64Number of save failures
load_failures: u64Number of load failures
incremental_updates: u64Number of incremental updates
compression_ratio: f64Compression ratio (compressed / uncompressed)
Implementations§
Source§impl PersistenceStats
impl PersistenceStats
Sourcepub fn avg_bytes_per_entry_written(&self) -> f64
pub fn avg_bytes_per_entry_written(&self) -> f64
Calculate average bytes per entry written
Sourcepub fn avg_bytes_per_entry_read(&self) -> f64
pub fn avg_bytes_per_entry_read(&self) -> f64
Calculate average bytes per entry read
Sourcepub fn save_success_rate(&self) -> f64
pub fn save_success_rate(&self) -> f64
Calculate success rate for saves
Sourcepub fn load_success_rate(&self) -> f64
pub fn load_success_rate(&self) -> f64
Calculate success rate for loads
Trait Implementations§
Source§impl Clone for PersistenceStats
impl Clone for PersistenceStats
Source§fn clone(&self) -> PersistenceStats
fn clone(&self) -> PersistenceStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PersistenceStats
impl Debug for PersistenceStats
Source§impl Default for PersistenceStats
impl Default for PersistenceStats
Source§fn default() -> PersistenceStats
fn default() -> PersistenceStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PersistenceStats
impl RefUnwindSafe for PersistenceStats
impl Send for PersistenceStats
impl Sync for PersistenceStats
impl Unpin for PersistenceStats
impl UnsafeUnpin for PersistenceStats
impl UnwindSafe for PersistenceStats
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> 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>
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 moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.