Struct tikv::coprocessor::tracker::Tracker[][src]

pub struct Tracker {
    request_begin_at: Instant,
    current_stage: TrackerState,
    wait_time: Duration,
    schedule_wait_time: Duration,
    snapshot_wait_time: Duration,
    handler_build_time: Duration,
    req_lifetime: Duration,
    item_suspend_time: Duration,
    total_suspend_time: Duration,
    item_process_time: Duration,
    total_process_time: Duration,
    total_storage_stats: Statistics,
    total_perf_stats: PerfStatisticsDelta,
    slow_log_threshold: Duration,
    pub req_ctx: ReqContext,
}

Track coprocessor requests to update statistics and provide slow logs.

Fields

request_begin_at: Instantcurrent_stage: TrackerStatewait_time: Durationschedule_wait_time: Durationsnapshot_wait_time: Durationhandler_build_time: Durationreq_lifetime: Durationitem_suspend_time: Durationtotal_suspend_time: Durationitem_process_time: Durationtotal_process_time: Durationtotal_storage_stats: Statisticstotal_perf_stats: PerfStatisticsDeltaslow_log_threshold: Durationreq_ctx: ReqContext

Implementations

impl Tracker[src]

pub fn new(req_ctx: ReqContext, slow_log_threshold: Duration) -> Tracker[src]

Initialize the tracker. Normally it is called outside future pool’s factory context, because the future pool might be full and we need to wait it. This kind of wait time has to be recorded.

pub fn on_scheduled(&mut self)[src]

pub fn on_snapshot_finished(&mut self)[src]

pub fn on_begin_all_items(&mut self)[src]

pub fn on_begin_item(&mut self)[src]

pub fn on_finish_item(
    &mut self,
    some_storage_stats: Option<Statistics>,
    perf_statistics: PerfStatisticsDelta
)
[src]

pub fn collect_storage_statistics(&mut self, storage_stats: Statistics)[src]

pub fn get_item_exec_details(&self) -> (ExecDetails, ExecDetailsV2)[src]

Get current item’s ExecDetail according to previous collected metrics. TiDB asks for ExecDetail to be printed in its log. WARN: TRY BEST NOT TO USE THIS FUNCTION.

pub fn get_exec_details(&self) -> (ExecDetails, ExecDetailsV2)[src]

Get ExecDetail according to previous collected metrics. TiDB asks for ExecDetail to be printed in its log.

fn exec_details(&self, measure: Duration) -> (ExecDetails, ExecDetailsV2)[src]

pub fn on_finish_all_items(&mut self)[src]

fn track(&mut self)[src]

Trait Implementations

impl Debug for Tracker[src]

impl Drop for Tracker[src]

fn drop(&mut self)[src]

Tracker may be dropped without even calling on_begin_all_items. For example, if get snapshot failed. So we fast-forward if some steps are missing.

Auto Trait Implementations

impl RefUnwindSafe for Tracker

impl Send for Tracker

impl Sync for Tracker

impl Unpin for Tracker

impl UnwindSafe for Tracker

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]