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 new() -> MetricsSet
pub fn new() -> MetricsSet
Create a new container of metrics
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 spilled_rows(&self) -> Option<usize>
pub fn spilled_rows(&self) -> Option<usize>
Convenience: return the total rows 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>
pub fn sum<F>(&self, f: F) -> Option<MetricValue>
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) -> MetricsSet
pub fn aggregate_by_name(&self) -> MetricsSet
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) -> MetricsSet
pub fn sorted_for_display(self) -> MetricsSet
Sort the order of metrics so the “most useful” show up first
sourcepub fn timestamps_removed(self) -> MetricsSet
pub fn timestamps_removed(self) -> MetricsSet
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 moresource§impl Debug for MetricsSet
impl Debug for MetricsSet
source§impl Default for MetricsSet
impl Default for MetricsSet
source§fn default() -> MetricsSet
fn default() -> MetricsSet
Auto Trait Implementations§
impl Freeze for MetricsSet
impl !RefUnwindSafe for MetricsSet
impl Send for MetricsSet
impl Sync for MetricsSet
impl Unpin for MetricsSet
impl !UnwindSafe for MetricsSet
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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