Skip to main content

MetricsRecorder

Struct MetricsRecorder 

Source
pub struct MetricsRecorder { /* private fields */ }
Expand description

Records one plan execution’s metrics into its observation owner.

Implementations§

Source§

impl MetricsRecorder

Source

pub fn new( observation: RuntimeObservationHandle, plan_execution_id: PlanExecutionId, ) -> Self

Binds a recorder to one plan execution of a query-bound session.

Source

pub fn bind( observation: &RuntimeObservationHandle, plan_execution_id: PlanExecutionId, query_id: &str, trace_id: Option<&str>, ) -> Self

Binds a recorder to one plan execution, owning the metrics locally when the caller’s observation has no owner.

A context built without an observation session still produces metrics: its plan execution gets a private owner with the native retention profile. That owner records metrics only; the caller’s trace stays off.

Source

pub const fn plan_execution_id(&self) -> &PlanExecutionId

The plan execution this recorder reports into.

Source

pub fn checkpoint(&self) -> Option<QueryMetricsCheckpoint>

One internally consistent view of this plan execution’s metrics.

Source

pub fn freeze(&self) -> Option<QueryMetricsCheckpoint>

Freezes this plan execution’s metrics and returns them. Facts recorded for it afterwards are ignored, so every later checkpoint and the sealed snapshot carry this value.

Source

pub fn progress(&self) -> ExecutionProgress

Source chunk and partial aggregate counts so far, for diagnostic facts. Never an input to execution decisions.

Source

pub fn boundary(&self) -> BoundaryMetrics

The data-boundary counters so far, for reporting one operation’s share. Never an input to execution decisions.

Source

pub fn record_source_read(&self, fact: SourceReadFact)

Records one source-read fact.

Source

pub fn record_source_read_runtime(&self, row: SourceReadRuntimeMetrics)

Offers one source-read detail row for bounded retention.

Source

pub fn record_input_batch(&self, rows: u64)

Records one input batch and its row count.

Source

pub fn record_parquet_source( &self, known_bytes: Option<u64>, selected_row_groups: u64, read_columns: u64, )

Records one Parquet source file observation.

Source

pub fn record_source_chunk_planned(&self, row_groups: u64)

Records that a source chunk was planned.

Source

pub fn record_source_chunk_attempt(&self)

Records one source chunk attempt.

Source

pub fn record_source_chunk_commit(&self, row_groups: u64)

Records one committed source chunk and row-group count.

Source

pub fn record_source_chunk_commit_count( &self, chunk_count: u64, row_groups: u64, )

Records committed source chunks and row-group count.

Source

pub fn record_source_chunk_retry(&self)

Records one source chunk retry.

Source

pub fn record_source_read_prefetch_started(&self)

Records a started source-read prefetch.

Source

pub fn record_source_read_prefetch_completed(&self)

Records a completed source-read prefetch.

Source

pub fn record_source_read_prefetch_skipped(&self)

Records a skipped source-read prefetch.

Source

pub fn record_source_read_prefetch_abandoned(&self)

Records an abandoned source-read prefetch.

Source

pub fn add_source_read_time(&self, elapsed: Duration)

Adds source-read orchestration time.

Source

pub fn add_operator_time(&self, elapsed: Duration)

Adds native operator time.

Source

pub fn add_chunk_operator_time(&self, elapsed: Duration)

Adds operator time spent inside source chunks.

Source

pub fn add_final_merge_time(&self, elapsed: Duration)

Adds final-merge time.

Source

pub fn add_final_sort_time(&self, elapsed: Duration)

Adds final-sort time.

Source

pub fn add_materialization_time(&self, elapsed: Duration)

Adds host materialization time.

Source

pub fn record_gpu_resident_input_handoff(&self)

Records a GPU-resident input handoff.

Source

pub fn record_host_to_device_upload(&self, rows: u64, bytes: u64)

Records a host-to-device upload.

Source

pub fn record_device_to_host_materialization(&self, rows: u64, bytes: u64)

Records a device-to-host materialization.

Source

pub fn record_device_memory_observation(&self, bytes: u64)

Records one device memory observation.

Source

pub fn record_allocator_high_water_bytes(&self, bytes: u64)

Records the allocation high-water mark of the attempt’s allocation domain.

Source

pub fn record_operator_metrics(&self, row: OperatorMetrics)

Records one operator occurrence.

Source

pub fn record_aggregate_strategy_decision( &self, node_id: impl ToString, facts: &BTreeMap<&'static str, String>, )

Records one aggregate strategy decision.

Source

pub fn record_partial_aggregate( &self, input_rows: u64, output_rows: u64, retained_bytes: u64, )

Records one partial aggregate.

Source

pub fn record_final_merge_attempt(&self, merge_fan_in: usize)

Records one final-merge attempt.

Source

pub fn record_final_merge_level(&self)

Records one final-merge level.

Source

pub fn record_join_strategy_decision( &self, node_id: impl ToString, facts: &BTreeMap<&'static str, String>, )

Records one join strategy decision.

Source

pub fn record_hash_join_build(&self)

Records a hash-join build.

Source

pub fn record_filtered_join_build(&self)

Records a filtered-join build.

Source

pub fn record_one_shot_join(&self)

Records a one-shot join.

Source

pub fn record_hash_join_hash_table_bytes(&self, bytes: u64)

Records hash-join hash table bytes.

Source

pub fn record_filtered_join_hash_table_bytes(&self, bytes: u64)

Records filtered-join hash table bytes.

Source

pub fn record_filtered_join_probe_state_bytes(&self, bytes: u64)

Records filtered-join probe state bytes.

Source

pub fn record_mixed_join_size_data_bytes(&self, bytes: u64)

Records mixed-join size data bytes.

Source

pub fn record_one_shot_join_index_bytes(&self, bytes: u64)

Records one-shot join index bytes.

Source

pub fn record_one_shot_join_materialization_bytes(&self, bytes: u64)

Records one-shot join materialization bytes.

Source

pub fn record_one_shot_join_output_bytes(&self, bytes: u64)

Records one-shot join output bytes.

Source

pub fn record_dynamic_filter_produced( &self, route: &DynamicFilterRoute, filter: &DynamicFilter, producer_rows: u64, )

Records a produced dynamic filter.

Source

pub fn record_dynamic_filter_skipped( &self, route: &DynamicFilterRoute, reason: impl Into<String>, )

Records a skipped dynamic filter.

Source

pub fn record_dynamic_filter_applied( &self, route: &DynamicFilterRoute, filter: &DynamicFilter, before: DynamicFilterSourceSnapshot, after: DynamicFilterSourceSnapshot, )

Records a dynamic filter applied to a source.

Source

pub fn record_dynamic_filter_applied_post_decode( &self, route: &DynamicFilterRoute, filter: &DynamicFilter, rows_before: Option<u64>, rows_after: Option<u64>, )

Records a dynamic filter applied after decode.

Source

pub fn record_dynamic_filter_source_post_decode_stage( &self, route: &DynamicFilterRoute, filter: &DynamicFilter, rows_before: Option<u64>, rows_after: Option<u64>, )

Records one source post-decode dynamic-filter stage.

Source

pub fn record_dynamic_filter_post_decode_rows( &self, route: &DynamicFilterRoute, filter: &DynamicFilter, rows_before: Option<u64>, rows_after: Option<u64>, )

Records post-decode dynamic-filter row counts.

Source

pub fn record_dynamic_filter_source_reader_predicate_rows( &self, route: &DynamicFilterRoute, filter: &DynamicFilter, source_file_index: usize, source_chunk_index: usize, rows_before: Option<u64>, rows_after: Option<u64>, )

Records reader-predicate dynamic-filter row counts for one source chunk.

Source

pub fn record_dynamic_filter_source_reader_predicate_batch_rows( &self, route: &DynamicFilterRoute, filter: &DynamicFilter, rows_before: Option<u64>, rows_after: Option<u64>, )

Records reader-predicate dynamic-filter row counts for one source batch.

Source

pub fn record_dynamic_filter_reader_predicate_source_reduction( &self, rows_before: Option<u64>, rows_after: Option<u64>, )

Records a reader-predicate dynamic-filter source reduction.

Source

pub fn record_graph_algorithm_runtime(&self, row: GraphAlgorithmRuntimeMetrics)

Records one graph algorithm runtime row.

Source

pub fn record_graph_claim_calibration( &self, node_id: NodeId, algorithm: GraphAlgorithm, )

Opens a pending graph measured-peak row.

Source

pub fn record_graph_claim_calibration_measurement( &self, node_id: NodeId, algorithm: GraphAlgorithm, measured_peak_bytes: Option<u64>, measured_peak_provenance: GraphMeasuredPeakProvenance, )

Completes the most recent pending graph measured-peak row.

Source

pub fn record_graph_claim_calibration_algorithm_started( &self, node_id: NodeId, algorithm: GraphAlgorithm, )

Records the transition into the native graph algorithm executor.

Source

pub fn record_budgeted_execution( &self, operation: impl Into<String>, report: &ExecutionBudgetReport, )

Records a lower-level cuDF execution-budget report.

Source

pub fn open_budget_window(&self) -> BudgetWindow

Opens a window whose budget reports are later folded into one task.

Source

pub fn take_budget_window(&self, window: BudgetWindow) -> BudgetWindowPeaks

Closes a budget window and returns the peaks it saw, for an operation that reports them itself.

Source

pub fn close_budget_window( &self, compiled_task_id: impl ToString, window: BudgetWindow, )

Folds the peaks a budget window saw into one compiled task.

Source

pub fn record_compiled_pipeline_task_execution( &self, compiled_task_id: impl ToString, operator_kind: impl Into<String>, )

Records execution of a compiled pipeline task.

Source

pub fn record_compiled_pipeline_task_mapping( &self, compiled_task_id: impl ToString, operator_kind: impl Into<String>, plan_node_id: Option<impl Into<PlanNodeId>>, )

Records one compiled task’s plan mapping.

Source

pub fn record_task_elapsed( &self, task_id: impl ToString, operator_kind: impl Into<String>, elapsed: Duration, )

Records elapsed time for one task.

Source

pub fn record_retry_resource_exhausted(&self)

Records a resource-exhausted retry.

Source

pub fn record_compiled_pipeline_attempt(&self)

Records one compiled pipeline attempt.

Source

pub fn record_compiled_pipeline_tasks_executed(&self, tasks: u64)

Records executed compiled pipeline tasks.

Source

pub fn record_compiled_pipeline_host_arrow_sink(&self)

Records a compiled pipeline host Arrow sink.

Trait Implementations§

Source§

impl Clone for MetricsRecorder

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MetricsRecorder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more