Trait tidb_query_common::execute_stats::ExecSummaryCollector[][src]

pub trait ExecSummaryCollector: Send {
    type DurationRecorder;
    fn new(output_index: usize) -> Self
    where
        Self: Sized
;
fn on_start_iterate(&mut self) -> Self::DurationRecorder;
fn on_finish_iterate(&mut self, dr: Self::DurationRecorder, rows: usize);
fn collect(&mut self, target: &mut [ExecSummary]); }

A trait for all execution summary collectors.

Associated Types

type DurationRecorder[src]

Loading content...

Required methods

fn new(output_index: usize) -> Self where
    Self: Sized
[src]

Creates a new instance with specified output slot index.

fn on_start_iterate(&mut self) -> Self::DurationRecorder[src]

Returns an instance that will record elapsed duration and increase the iterations counter. The instance should be later passed back to on_finish_iterate when processing of next_batch is completed.

fn on_finish_iterate(&mut self, dr: Self::DurationRecorder, rows: usize)[src]

fn collect(&mut self, target: &mut [ExecSummary])[src]

Takes and appends current execution summary into target.

Loading content...

Implementors

impl ExecSummaryCollector for ExecSummaryCollectorDisabled[src]

type DurationRecorder = ()

impl ExecSummaryCollector for ExecSummaryCollectorEnabled[src]

Loading content...