Skip to main content

TimingStampMs

Struct TimingStampMs 

Source
pub struct TimingStampMs {
    pub elapsed_ms: f64,
    pub parse_ms: f64,
    pub plan_ms: f64,
    pub execute_ms: f64,
    pub lex_parse_ms: f64,
    pub rewrite_ms: f64,
    pub lower_ms: f64,
    pub result_generation_ms: f64,
    pub plan_cache: &'static str,
}
Expand description

The statement’s timing block as one wire value — the wire-side spelling of the engine’s result-header timing stamp: the ADR-0221 wall-clock total (elapsed_ms) together with its always-on PARSE / PLAN / EXECUTE split (ADR-0491) and the fine sub-split plus the plan-cache outcome (LABS-1120), flattened to the envelope keys’ own milliseconds. Bundled like the engine bundles its stamp, so an envelope construction site cannot carry the total without its split — and the canonical builder stays under clippy::too_many_arguments.

PARSE is the front-end parse and lowering; PLAN is binding, logical planning and the admission classification; EXECUTE is the dispatch — or, for EXPLAIN, the plan render, that path’s execute-equivalent stage. The three are disjoint sub-windows of the window elapsed_ms spans, so their sum never exceeds the total (the inter-stage gaps stay in the total alone); milliseconds because this is the elapsed_ms family it extends (Bolt’s seconds rendering is that surface’s own conversion, per ADR-0491 §3). The LABS-1120 fine sub-windows partition their coarse phase the same way; plan_cache explains a hit’s near-zero parse window.

Fields§

§elapsed_ms: f64

The ADR-0221 wall-clock total, in milliseconds.

§parse_ms: f64

The PARSE stage, in milliseconds.

§plan_ms: f64

The PLAN stage, in milliseconds.

§execute_ms: f64

The EXECUTE stage, in milliseconds.

§lex_parse_ms: f64

The PARSE stage’s lexing-plus-AST-build sub-window, in milliseconds (LABS-1120) — zero on a plan-cache hit, which plan_cache explains.

§rewrite_ms: f64

The PARSE stage’s rewrite sub-window (the CIP-231 resolver), in milliseconds (LABS-1120) — zero on a plan-cache hit.

§lower_ms: f64

The PARSE stage’s validation-and-lowering sub-window, in milliseconds (LABS-1120) — zero on a plan-cache hit.

§result_generation_ms: f64

The EXECUTE stage’s result-generation sub-window, in milliseconds (LABS-1120) — zero on the EXPLAIN path, whose render is itself its result generation.

§plan_cache: &'static str

The statement’s plan-cache outcome (LABS-1120) as the engine enum’s own wire spelling (PlanCacheOutcome::as_str, kebab-case) — never re-spelled here: the engine crate pins the vocabulary against its enum with a test, so this field cannot drift from it.

Implementations§

Source§

impl TimingStampMs

Source

pub fn to_timings_json(&self) -> Value

The nested timings object (LABS-1120): every duration key of the stamp under one object — the form the surfaces that had no flat elapsed_ms family before (the CLI machine modes, the HTTP Query API v2 envelope) carry, so those envelopes stay forward-compatible (a later phase joins the object, never the top level). The plan-cache outcome rides beside the object, never inside it — it is an outcome, not a duration. One builder for every surface, so the key set cannot drift between them.

Trait Implementations§

Source§

impl Clone for TimingStampMs

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 Copy for TimingStampMs

Source§

impl Debug for TimingStampMs

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for TimingStampMs

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TimingStampMs

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, 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> 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.