pub enum ArrowReaderMetrics {
Disabled,
Enabled(Arc<ArrowReaderMetricsInner>),
}
Expand description
This enum represents the state of Arrow reader metrics collection.
The inner metrics are stored in an Arc<ArrowReaderMetricsInner>
so cloning the ArrowReaderMetrics
enum will not clone the inner metrics.
To access metrics, create an ArrowReaderMetrics
via ArrowReaderMetrics::enabled()
and configure the ArrowReaderBuilder
with a clone.
Variants§
Disabled
Metrics are not collected (default)
Enabled(Arc<ArrowReaderMetricsInner>)
Metrics are collected and stored in an Arc
.
Create this via ArrowReaderMetrics::enabled()
.
Implementations§
Source§impl ArrowReaderMetrics
impl ArrowReaderMetrics
Sourcepub fn disabled() -> Self
pub fn disabled() -> Self
Creates a new instance of ArrowReaderMetrics::Disabled
Sourcepub fn enabled() -> Self
pub fn enabled() -> Self
Creates a new instance of ArrowReaderMetrics::Enabled
Sourcepub fn records_read_from_inner(&self) -> Option<usize>
pub fn records_read_from_inner(&self) -> Option<usize>
Predicate Cache: number of records read directly from the inner reader
This is the total number of records read from the inner reader (that is actually decoding). It measures the amount of work that could not be avoided with caching.
It returns the number of records read across all columns, so if you read 2 columns each with 100 records, this will return 200.
Returns None if metrics are disabled.
Sourcepub fn records_read_from_cache(&self) -> Option<usize>
pub fn records_read_from_cache(&self) -> Option<usize>
Predicate Cache: number of records read from the cache
This is the total number of records read from the cache actually decoding). It measures the amount of work that was avoided with caching.
It returns the number of records read across all columns, so if you read 2 columns each with 100 records from the cache, this will return 200.
Returns None if metrics are disabled.
Sourcepub(crate) fn increment_inner_reads(&self, count: usize)
pub(crate) fn increment_inner_reads(&self, count: usize)
Increments the count of records read from the inner reader
Sourcepub(crate) fn increment_cache_reads(&self, count: usize)
pub(crate) fn increment_cache_reads(&self, count: usize)
Increments the count of records read from the cache
Trait Implementations§
Source§impl Clone for ArrowReaderMetrics
impl Clone for ArrowReaderMetrics
Source§fn clone(&self) -> ArrowReaderMetrics
fn clone(&self) -> ArrowReaderMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ArrowReaderMetrics
impl RefUnwindSafe for ArrowReaderMetrics
impl Send for ArrowReaderMetrics
impl Sync for ArrowReaderMetrics
impl Unpin for ArrowReaderMetrics
impl UnwindSafe for ArrowReaderMetrics
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