pub struct FieldMetrics {
pub name: String,
pub full_path: String,
pub depth: usize,
pub count: u64,
pub lenbits: u32,
pub entropy: f64,
pub lz_matches: u64,
pub bit_counts: Vec<BitStats>,
pub bit_order: BitOrder,
pub value_counts: FxHashMap<u64, u64>,
pub zstd_size: u64,
pub original_size: u64,
}
Expand description
Complete analysis metrics for a single field
Fields§
§name: String
Name of the field or group
full_path: String
Name of the full path to the field or group
depth: usize
The depth of the field in the group/field chain.
count: u64
Total number of observed values
lenbits: u32
Length of the field or group in bits.
entropy: f64
Shannon entropy in bits
lz_matches: u64
LZ compression matches in the field
bit_counts: Vec<BitStats>
Bit-level statistics. Index of tuple is bit offset.
bit_order: BitOrder
The order of the bits within the field
value_counts: FxHashMap<u64, u64>
Value → occurrence count Count of occurrences for each observed value.
zstd_size: u64
Actual size of the compressed data when compressed with zstandard
original_size: u64
Original size of the data before compression
Implementations§
Source§impl FieldMetrics
impl FieldMetrics
Sourcepub fn try_merge_many(
items: &[&Self],
) -> Result<FieldMetrics, AnalysisMergeError>
pub fn try_merge_many( items: &[&Self], ) -> Result<FieldMetrics, AnalysisMergeError>
Merge multiple FieldMetrics
objects into one.
This gives you an ‘aggregate’ result over a large data set.
§Arguments
items
- The items to merge into a new instance.
Sourcepub fn parent_path(&self) -> Option<&str>
pub fn parent_path(&self) -> Option<&str>
Returns the parent path of the current field. The parent path is the part of the full path before the last dot.
Sourcepub fn parent_metrics_or<'a>(
&self,
results: &'a AnalysisResults,
optb: &'a FieldMetrics,
) -> &'a FieldMetrics
pub fn parent_metrics_or<'a>( &self, results: &'a AnalysisResults, optb: &'a FieldMetrics, ) -> &'a FieldMetrics
Returns the FieldMetrics
object for the parent of the current field.
Returns None
if there is no parent.
Sourcepub fn parent_metrics_in_merged_or<'a>(
&self,
results: &'a MergedAnalysisResults,
optb: &'a FieldMetrics,
) -> &'a FieldMetrics
pub fn parent_metrics_in_merged_or<'a>( &self, results: &'a MergedAnalysisResults, optb: &'a FieldMetrics, ) -> &'a FieldMetrics
Returns the FieldMetrics
object for the parent of the current field in a merged result.
Sourcepub fn sorted_value_counts(&self) -> Vec<(&u64, &u64)>
pub fn sorted_value_counts(&self) -> Vec<(&u64, &u64)>
Get sorted value counts descending (value, count)
Trait Implementations§
Source§impl Clone for FieldMetrics
impl Clone for FieldMetrics
Source§fn clone(&self) -> FieldMetrics
fn clone(&self) -> FieldMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for FieldMetrics
impl Default for FieldMetrics
Source§fn default() -> FieldMetrics
fn default() -> FieldMetrics
Source§impl From<FieldMetrics> for FieldComparisonMetrics
Converts a FieldMetrics
object into a FieldComparisonMetrics
object.
impl From<FieldMetrics> for FieldComparisonMetrics
Converts a FieldMetrics
object into a FieldComparisonMetrics
object.
Source§fn from(value: FieldMetrics) -> Self
fn from(value: FieldMetrics) -> Self
Auto Trait Implementations§
impl Freeze for FieldMetrics
impl RefUnwindSafe for FieldMetrics
impl Send for FieldMetrics
impl Sync for FieldMetrics
impl Unpin for FieldMetrics
impl UnwindSafe for FieldMetrics
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> 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