Struct datafusion::physical_plan::metrics::MetricsSet
source · [−]pub struct MetricsSet { /* private fields */ }
Expand description
A snapshot of the metrics for a particular operator (dyn ExecutionPlan
).
Implementations
sourceimpl MetricsSet
impl MetricsSet
sourcepub fn iter(&self) -> impl Iterator<Item = &Arc<Metric>>
pub fn iter(&self) -> impl Iterator<Item = &Arc<Metric>>
Returns an interator across all metrics
sourcepub fn output_rows(&self) -> Option<usize>
pub fn output_rows(&self) -> Option<usize>
convenience: return the number of rows produced, aggregated across partitions or None if no metric is present
sourcepub fn spill_count(&self) -> Option<usize>
pub fn spill_count(&self) -> Option<usize>
convenience: return the count of spills, aggregated across partitions or None if no metric is present
sourcepub fn spilled_bytes(&self) -> Option<usize>
pub fn spilled_bytes(&self) -> Option<usize>
convenience: return the total byte size of spills, aggregated across partitions or None if no metric is present
sourcepub fn elapsed_compute(&self) -> Option<usize>
pub fn elapsed_compute(&self) -> Option<usize>
convenience: return the amount of elapsed CPU time spent, aggregated across partitions or None if no metric is present
sourcepub fn sum<F>(&self, f: F) -> Option<MetricValue> where
F: FnMut(&Metric) -> bool,
pub fn sum<F>(&self, f: F) -> Option<MetricValue> where
F: FnMut(&Metric) -> bool,
Sums the values for metrics for which f(metric)
returns
true, and returns the value. Returns None if no metrics match
the predicate.
sourcepub fn aggregate_by_partition(&self) -> Self
pub fn aggregate_by_partition(&self) -> Self
Returns returns a new derived MetricsSet
where all metrics
that had the same name and partition=Some(..)
have been
aggregated together. The resulting MetricsSet
has all
metrics with Partition=None
sourcepub fn sorted_for_display(self) -> Self
pub fn sorted_for_display(self) -> Self
Sort the order of metrics so the “most useful” show up first
sourcepub fn timestamps_removed(self) -> Self
pub fn timestamps_removed(self) -> Self
remove all timestamp metrics (for more compact display
Trait Implementations
sourceimpl Clone for MetricsSet
impl Clone for MetricsSet
sourcefn clone(&self) -> MetricsSet
fn clone(&self) -> MetricsSet
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MetricsSet
impl Debug for MetricsSet
sourceimpl Default for MetricsSet
impl Default for MetricsSet
sourcefn default() -> MetricsSet
fn default() -> MetricsSet
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for MetricsSet
impl Send for MetricsSet
impl Sync for MetricsSet
impl Unpin for MetricsSet
impl !UnwindSafe for MetricsSet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more