pub struct DedupStats {
pub total_blocks: usize,
pub shared_blocks: usize,
pub unique_blocks: usize,
pub total_ref_count: u64,
pub total_bytes: u64,
pub saved_bytes: u64,
}Expand description
A point-in-time snapshot of deduplication statistics.
Fields§
§total_blocks: usizeTotal number of unique blocks tracked.
Number of blocks with ref_count > 1.
unique_blocks: usizeNumber of blocks with ref_count == 1.
total_ref_count: u64Sum of all reference counts across all blocks.
total_bytes: u64Sum of size_bytes for all tracked blocks (physical storage used).
saved_bytes: u64Total bytes saved by deduplication (sum of savings_bytes()).
Implementations§
Source§impl DedupStats
impl DedupStats
Sourcepub fn dedup_ratio(&self) -> f64
pub fn dedup_ratio(&self) -> f64
Returns the fraction of blocks that are shared (shared_blocks / total_blocks).
Returns 0.0 when there are no blocks.
Trait Implementations§
Source§impl Clone for DedupStats
impl Clone for DedupStats
Source§fn clone(&self) -> DedupStats
fn clone(&self) -> DedupStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DedupStats
impl Debug for DedupStats
Source§impl PartialEq for DedupStats
impl PartialEq for DedupStats
Source§fn eq(&self, other: &DedupStats) -> bool
fn eq(&self, other: &DedupStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DedupStats
Auto Trait Implementations§
impl Freeze for DedupStats
impl RefUnwindSafe for DedupStats
impl Send for DedupStats
impl Sync for DedupStats
impl Unpin for DedupStats
impl UnsafeUnpin for DedupStats
impl UnwindSafe for DedupStats
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more