pub struct MetricsRecorder { /* private fields */ }Expand description
Records one plan execution’s metrics into its observation owner.
Implementations§
Source§impl MetricsRecorder
impl MetricsRecorder
Sourcepub fn new(
observation: RuntimeObservationHandle,
plan_execution_id: PlanExecutionId,
) -> Self
pub fn new( observation: RuntimeObservationHandle, plan_execution_id: PlanExecutionId, ) -> Self
Binds a recorder to one plan execution of a query-bound session.
Sourcepub fn bind(
observation: &RuntimeObservationHandle,
plan_execution_id: PlanExecutionId,
query_id: &str,
trace_id: Option<&str>,
) -> Self
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.
Sourcepub const fn plan_execution_id(&self) -> &PlanExecutionId
pub const fn plan_execution_id(&self) -> &PlanExecutionId
The plan execution this recorder reports into.
Sourcepub fn checkpoint(&self) -> Option<QueryMetricsCheckpoint>
pub fn checkpoint(&self) -> Option<QueryMetricsCheckpoint>
One internally consistent view of this plan execution’s metrics.
Sourcepub fn freeze(&self) -> Option<QueryMetricsCheckpoint>
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.
Sourcepub fn progress(&self) -> ExecutionProgress
pub fn progress(&self) -> ExecutionProgress
Source chunk and partial aggregate counts so far, for diagnostic facts. Never an input to execution decisions.
Sourcepub fn boundary(&self) -> BoundaryMetrics
pub fn boundary(&self) -> BoundaryMetrics
The data-boundary counters so far, for reporting one operation’s share. Never an input to execution decisions.
Sourcepub fn record_source_read(&self, fact: SourceReadFact)
pub fn record_source_read(&self, fact: SourceReadFact)
Records one source-read fact.
Sourcepub fn record_source_read_runtime(&self, row: SourceReadRuntimeMetrics)
pub fn record_source_read_runtime(&self, row: SourceReadRuntimeMetrics)
Offers one source-read detail row for bounded retention.
Sourcepub fn record_input_batch(&self, rows: u64)
pub fn record_input_batch(&self, rows: u64)
Records one input batch and its row count.
Sourcepub fn record_parquet_source(
&self,
known_bytes: Option<u64>,
selected_row_groups: u64,
read_columns: u64,
)
pub fn record_parquet_source( &self, known_bytes: Option<u64>, selected_row_groups: u64, read_columns: u64, )
Records one Parquet source file observation.
Sourcepub fn record_source_chunk_planned(&self, row_groups: u64)
pub fn record_source_chunk_planned(&self, row_groups: u64)
Records that a source chunk was planned.
Sourcepub fn record_source_chunk_attempt(&self)
pub fn record_source_chunk_attempt(&self)
Records one source chunk attempt.
Sourcepub fn record_source_chunk_commit(&self, row_groups: u64)
pub fn record_source_chunk_commit(&self, row_groups: u64)
Records one committed source chunk and row-group count.
Sourcepub fn record_source_chunk_commit_count(
&self,
chunk_count: u64,
row_groups: u64,
)
pub fn record_source_chunk_commit_count( &self, chunk_count: u64, row_groups: u64, )
Records committed source chunks and row-group count.
Sourcepub fn record_source_chunk_retry(&self)
pub fn record_source_chunk_retry(&self)
Records one source chunk retry.
Sourcepub fn record_source_read_prefetch_started(&self)
pub fn record_source_read_prefetch_started(&self)
Records a started source-read prefetch.
Sourcepub fn record_source_read_prefetch_completed(&self)
pub fn record_source_read_prefetch_completed(&self)
Records a completed source-read prefetch.
Sourcepub fn record_source_read_prefetch_skipped(&self)
pub fn record_source_read_prefetch_skipped(&self)
Records a skipped source-read prefetch.
Sourcepub fn record_source_read_prefetch_abandoned(&self)
pub fn record_source_read_prefetch_abandoned(&self)
Records an abandoned source-read prefetch.
Sourcepub fn add_source_read_time(&self, elapsed: Duration)
pub fn add_source_read_time(&self, elapsed: Duration)
Adds source-read orchestration time.
Sourcepub fn add_operator_time(&self, elapsed: Duration)
pub fn add_operator_time(&self, elapsed: Duration)
Adds native operator time.
Sourcepub fn add_chunk_operator_time(&self, elapsed: Duration)
pub fn add_chunk_operator_time(&self, elapsed: Duration)
Adds operator time spent inside source chunks.
Sourcepub fn add_final_merge_time(&self, elapsed: Duration)
pub fn add_final_merge_time(&self, elapsed: Duration)
Adds final-merge time.
Sourcepub fn add_final_sort_time(&self, elapsed: Duration)
pub fn add_final_sort_time(&self, elapsed: Duration)
Adds final-sort time.
Sourcepub fn add_materialization_time(&self, elapsed: Duration)
pub fn add_materialization_time(&self, elapsed: Duration)
Adds host materialization time.
Sourcepub fn record_gpu_resident_input_handoff(&self)
pub fn record_gpu_resident_input_handoff(&self)
Records a GPU-resident input handoff.
Sourcepub fn record_host_to_device_upload(&self, rows: u64, bytes: u64)
pub fn record_host_to_device_upload(&self, rows: u64, bytes: u64)
Records a host-to-device upload.
Sourcepub fn record_device_to_host_materialization(&self, rows: u64, bytes: u64)
pub fn record_device_to_host_materialization(&self, rows: u64, bytes: u64)
Records a device-to-host materialization.
Sourcepub fn record_device_memory_observation(&self, bytes: u64)
pub fn record_device_memory_observation(&self, bytes: u64)
Records one device memory observation.
Sourcepub fn record_allocator_high_water_bytes(&self, bytes: u64)
pub fn record_allocator_high_water_bytes(&self, bytes: u64)
Records the allocation high-water mark of the attempt’s allocation domain.
Sourcepub fn record_operator_metrics(&self, row: OperatorMetrics)
pub fn record_operator_metrics(&self, row: OperatorMetrics)
Records one operator occurrence.
Sourcepub fn record_aggregate_strategy_decision(
&self,
node_id: impl ToString,
facts: &BTreeMap<&'static str, String>,
)
pub fn record_aggregate_strategy_decision( &self, node_id: impl ToString, facts: &BTreeMap<&'static str, String>, )
Records one aggregate strategy decision.
Sourcepub fn record_partial_aggregate(
&self,
input_rows: u64,
output_rows: u64,
retained_bytes: u64,
)
pub fn record_partial_aggregate( &self, input_rows: u64, output_rows: u64, retained_bytes: u64, )
Records one partial aggregate.
Sourcepub fn record_final_merge_attempt(&self, merge_fan_in: usize)
pub fn record_final_merge_attempt(&self, merge_fan_in: usize)
Records one final-merge attempt.
Sourcepub fn record_final_merge_level(&self)
pub fn record_final_merge_level(&self)
Records one final-merge level.
Sourcepub fn record_join_strategy_decision(
&self,
node_id: impl ToString,
facts: &BTreeMap<&'static str, String>,
)
pub fn record_join_strategy_decision( &self, node_id: impl ToString, facts: &BTreeMap<&'static str, String>, )
Records one join strategy decision.
Sourcepub fn record_hash_join_build(&self)
pub fn record_hash_join_build(&self)
Records a hash-join build.
Sourcepub fn record_filtered_join_build(&self)
pub fn record_filtered_join_build(&self)
Records a filtered-join build.
Sourcepub fn record_one_shot_join(&self)
pub fn record_one_shot_join(&self)
Records a one-shot join.
Sourcepub fn record_hash_join_hash_table_bytes(&self, bytes: u64)
pub fn record_hash_join_hash_table_bytes(&self, bytes: u64)
Records hash-join hash table bytes.
Sourcepub fn record_filtered_join_hash_table_bytes(&self, bytes: u64)
pub fn record_filtered_join_hash_table_bytes(&self, bytes: u64)
Records filtered-join hash table bytes.
Sourcepub fn record_filtered_join_probe_state_bytes(&self, bytes: u64)
pub fn record_filtered_join_probe_state_bytes(&self, bytes: u64)
Records filtered-join probe state bytes.
Sourcepub fn record_mixed_join_size_data_bytes(&self, bytes: u64)
pub fn record_mixed_join_size_data_bytes(&self, bytes: u64)
Records mixed-join size data bytes.
Sourcepub fn record_one_shot_join_index_bytes(&self, bytes: u64)
pub fn record_one_shot_join_index_bytes(&self, bytes: u64)
Records one-shot join index bytes.
Sourcepub fn record_one_shot_join_materialization_bytes(&self, bytes: u64)
pub fn record_one_shot_join_materialization_bytes(&self, bytes: u64)
Records one-shot join materialization bytes.
Sourcepub fn record_one_shot_join_output_bytes(&self, bytes: u64)
pub fn record_one_shot_join_output_bytes(&self, bytes: u64)
Records one-shot join output bytes.
Sourcepub fn record_dynamic_filter_produced(
&self,
route: &DynamicFilterRoute,
filter: &DynamicFilter,
producer_rows: u64,
)
pub fn record_dynamic_filter_produced( &self, route: &DynamicFilterRoute, filter: &DynamicFilter, producer_rows: u64, )
Records a produced dynamic filter.
Sourcepub fn record_dynamic_filter_skipped(
&self,
route: &DynamicFilterRoute,
reason: impl Into<String>,
)
pub fn record_dynamic_filter_skipped( &self, route: &DynamicFilterRoute, reason: impl Into<String>, )
Records a skipped dynamic filter.
Sourcepub fn record_dynamic_filter_applied(
&self,
route: &DynamicFilterRoute,
filter: &DynamicFilter,
before: DynamicFilterSourceSnapshot,
after: DynamicFilterSourceSnapshot,
)
pub fn record_dynamic_filter_applied( &self, route: &DynamicFilterRoute, filter: &DynamicFilter, before: DynamicFilterSourceSnapshot, after: DynamicFilterSourceSnapshot, )
Records a dynamic filter applied to a source.
Sourcepub fn record_dynamic_filter_applied_post_decode(
&self,
route: &DynamicFilterRoute,
filter: &DynamicFilter,
rows_before: Option<u64>,
rows_after: Option<u64>,
)
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.
Sourcepub fn record_dynamic_filter_source_post_decode_stage(
&self,
route: &DynamicFilterRoute,
filter: &DynamicFilter,
rows_before: Option<u64>,
rows_after: Option<u64>,
)
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.
Sourcepub fn record_dynamic_filter_post_decode_rows(
&self,
route: &DynamicFilterRoute,
filter: &DynamicFilter,
rows_before: Option<u64>,
rows_after: Option<u64>,
)
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.
Sourcepub 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>,
)
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.
Sourcepub fn record_dynamic_filter_source_reader_predicate_batch_rows(
&self,
route: &DynamicFilterRoute,
filter: &DynamicFilter,
rows_before: Option<u64>,
rows_after: Option<u64>,
)
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.
Sourcepub fn record_dynamic_filter_reader_predicate_source_reduction(
&self,
rows_before: Option<u64>,
rows_after: Option<u64>,
)
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.
Sourcepub fn record_graph_algorithm_runtime(&self, row: GraphAlgorithmRuntimeMetrics)
pub fn record_graph_algorithm_runtime(&self, row: GraphAlgorithmRuntimeMetrics)
Records one graph algorithm runtime row.
Sourcepub fn record_graph_claim_calibration(
&self,
node_id: NodeId,
algorithm: GraphAlgorithm,
)
pub fn record_graph_claim_calibration( &self, node_id: NodeId, algorithm: GraphAlgorithm, )
Opens a pending graph measured-peak row.
Sourcepub fn record_graph_claim_calibration_measurement(
&self,
node_id: NodeId,
algorithm: GraphAlgorithm,
measured_peak_bytes: Option<u64>,
measured_peak_provenance: GraphMeasuredPeakProvenance,
)
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.
Sourcepub fn record_graph_claim_calibration_algorithm_started(
&self,
node_id: NodeId,
algorithm: GraphAlgorithm,
)
pub fn record_graph_claim_calibration_algorithm_started( &self, node_id: NodeId, algorithm: GraphAlgorithm, )
Records the transition into the native graph algorithm executor.
Sourcepub fn record_budgeted_execution(
&self,
operation: impl Into<String>,
report: &ExecutionBudgetReport,
)
pub fn record_budgeted_execution( &self, operation: impl Into<String>, report: &ExecutionBudgetReport, )
Records a lower-level cuDF execution-budget report.
Sourcepub fn open_budget_window(&self) -> BudgetWindow
pub fn open_budget_window(&self) -> BudgetWindow
Opens a window whose budget reports are later folded into one task.
Sourcepub fn take_budget_window(&self, window: BudgetWindow) -> BudgetWindowPeaks
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.
Sourcepub fn close_budget_window(
&self,
compiled_task_id: impl ToString,
window: BudgetWindow,
)
pub fn close_budget_window( &self, compiled_task_id: impl ToString, window: BudgetWindow, )
Folds the peaks a budget window saw into one compiled task.
Sourcepub fn record_compiled_pipeline_task_execution(
&self,
compiled_task_id: impl ToString,
operator_kind: impl Into<String>,
)
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.
Sourcepub fn record_compiled_pipeline_task_mapping(
&self,
compiled_task_id: impl ToString,
operator_kind: impl Into<String>,
plan_node_id: Option<impl Into<PlanNodeId>>,
)
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.
Sourcepub fn record_task_elapsed(
&self,
task_id: impl ToString,
operator_kind: impl Into<String>,
elapsed: Duration,
)
pub fn record_task_elapsed( &self, task_id: impl ToString, operator_kind: impl Into<String>, elapsed: Duration, )
Records elapsed time for one task.
Sourcepub fn record_retry_resource_exhausted(&self)
pub fn record_retry_resource_exhausted(&self)
Records a resource-exhausted retry.
Sourcepub fn record_compiled_pipeline_attempt(&self)
pub fn record_compiled_pipeline_attempt(&self)
Records one compiled pipeline attempt.
Sourcepub fn record_compiled_pipeline_tasks_executed(&self, tasks: u64)
pub fn record_compiled_pipeline_tasks_executed(&self, tasks: u64)
Records executed compiled pipeline tasks.
Sourcepub fn record_compiled_pipeline_host_arrow_sink(&self)
pub fn record_compiled_pipeline_host_arrow_sink(&self)
Records a compiled pipeline host Arrow sink.
Trait Implementations§
Source§impl Clone for MetricsRecorder
impl Clone for MetricsRecorder
Auto Trait Implementations§
impl !RefUnwindSafe for MetricsRecorder
impl !UnwindSafe for MetricsRecorder
impl Freeze for MetricsRecorder
impl Send for MetricsRecorder
impl Sync for MetricsRecorder
impl Unpin for MetricsRecorder
impl UnsafeUnpin for MetricsRecorder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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