pub struct GroupDifference {
pub lz_matches: i64,
pub entropy: f64,
pub estimated_size: i64,
pub zstd_size: i64,
pub original_size: i64,
}
Expand description
Represents the difference between 2 groups of fields.
For the raw values of a single group, see GroupComparisonMetrics
.
This can be used for representing the difference between either splits, or any two arbitrary groups of analyzed bytes. Usually this is the difference between a result and a baseline.
Fields§
§lz_matches: i64
The difference in LZ matches.
entropy: f64
The difference in entropy
estimated_size: i64
Difference in estimated size using the user provided estimate function.
zstd_size: i64
Difference in zstd compressed size
original_size: i64
Difference in original size
Implementations§
Source§impl GroupDifference
impl GroupDifference
Sourcepub fn from_metrics(
baseline: &GroupComparisonMetrics,
comparison: &GroupComparisonMetrics,
) -> Self
pub fn from_metrics( baseline: &GroupComparisonMetrics, comparison: &GroupComparisonMetrics, ) -> Self
Creates a new GroupDifference by comparing two sets of metrics
§Arguments
baseline
- The baseline metrics to compare againstcomparison
- The metrics to compare with the baseline
§Returns
A new GroupDifference
containing the calculated differences
Trait Implementations§
Source§impl Clone for GroupDifference
impl Clone for GroupDifference
Source§fn clone(&self) -> GroupDifference
fn clone(&self) -> GroupDifference
Returns a copy 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 GroupDifference
impl Debug for GroupDifference
Source§impl Default for GroupDifference
impl Default for GroupDifference
Source§fn default() -> GroupDifference
fn default() -> GroupDifference
Returns the “default value” for a type. Read more
Source§impl PartialEq for GroupDifference
impl PartialEq for GroupDifference
impl Copy for GroupDifference
impl StructuralPartialEq for GroupDifference
Auto Trait Implementations§
impl Freeze for GroupDifference
impl RefUnwindSafe for GroupDifference
impl Send for GroupDifference
impl Sync for GroupDifference
impl Unpin for GroupDifference
impl UnwindSafe for GroupDifference
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