Struct datafusion::physical_plan::metrics::MetricsSet
source · pub struct MetricsSet { /* private fields */ }
Expand description
A snapshot of the metrics for a particular (ExecutionPlan
).
Implementations§
source§impl MetricsSet
impl MetricsSet
sourcepub fn iter(&self) -> impl Iterator<Item = &Arc<Metric>>
pub fn iter(&self) -> impl Iterator<Item = &Arc<Metric>>
Returns an iterator 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 sum_by_name(&self, metric_name: &str) -> Option<MetricValue>
pub fn sum_by_name(&self, metric_name: &str) -> Option<MetricValue>
Returns the sum of all the metrics with the specified name in the returned set.
sourcepub fn aggregate_by_name(&self) -> Self
pub fn aggregate_by_name(&self) -> Self
Returns a new derived MetricsSet
where all metrics
that had the same name 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§
source§impl Clone for MetricsSet
impl Clone for MetricsSet
source§fn clone(&self) -> MetricsSet
fn clone(&self) -> MetricsSet
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more