pub struct ColumnarStats {Show 14 fields
pub columnar_hits: AtomicU64,
pub columnar_misses: AtomicU64,
pub columnar_typed_hits: AtomicU64,
pub selection_attached: AtomicU64,
pub selection_materialized: AtomicU64,
pub selection_pushed: AtomicU64,
pub column_block_hits: AtomicU64,
pub multiplicity_expanded: AtomicU64,
pub spill_rows: AtomicU64,
pub spill_bytes: AtomicU64,
pub spill_runs: AtomicU64,
pub batch_outlets: AtomicU64,
pub columnar_b_path_hits: AtomicU64,
pub columnar_wasted_builds: AtomicU64,
/* private fields */
}Expand description
Query-level columnar fast-path counters (observability).
Shared via Arc with the chunks produced by source operators; every
DataChunk::evaluate_expression call records a hit (columnar batch path
succeeded) or a miss (fell back to per-row evaluation). The miss rate
exposes how much of the flat-column promise is actually kept.
columnar_typed_hits additionally counts evaluations served by the typed
batch fast path (raw Vec<i64>/Vec<f64>/Vec<i32> buffers).
Selection-vector counters record how often chunks are handed downstream
with a selection attached vs. materialized at a boundary.
Fields§
§columnar_hits: AtomicU64§columnar_misses: AtomicU64§columnar_typed_hits: AtomicU64Evaluations served by the typed batch fast path.
selection_attached: AtomicU64Chunks handed downstream with a selection vector attached.
selection_materialized: AtomicU64Chunks materialized at a selection boundary.
selection_pushed: AtomicU64evaluations served by the selection-aware visible-row fast path (selection vector consumed without materializing).
column_block_hits: AtomicU64Chunks produced by a source via the storage column-block path (A1).
multiplicity_expanded: AtomicU64Logical rows produced by expanding DataChunk::multiplicity at opaque
boundaries (normalize_for_opaque). Compared against stored rows it
yields the expanded/stored ratio for PROFILE observability.
spill_rows: AtomicU64Rows written to spill runs (all operators, incl. terminal collector).
spill_bytes: AtomicU64Bytes written to spill runs (on-disk file sizes).
spill_runs: AtomicU64Number of spill runs finalized.
batch_outlets: AtomicU64Chunks emitted through the batch-slice outlet path.
columnar_b_path_hits: AtomicU64Expressions served by the typed columnar fast path on the compiled
(project/filter) hot path — i.e. the compiled-over-rows path was
bypassed because the chunk carried a usable typed layout. Distinct
from columnar_typed_hits, which counts the scalar chunk evaluator.
columnar_wasted_builds: AtomicU64Typed layouts built by a producer that were dropped before any
downstream consumer read them (take_rows_for_reuse, join build
consumption). A high count means typed columns were built in vain.
Implementations§
Source§impl ColumnarStats
impl ColumnarStats
pub fn new() -> Self
pub fn record_hit(&self)
pub fn record_miss(&self)
Sourcepub fn record_typed_hit(&self)
pub fn record_typed_hit(&self)
Record an evaluation served by the typed batch fast path.
Sourcepub fn record_b_path_hit(&self)
pub fn record_b_path_hit(&self)
Record an expression served by the typed columnar fast path on the compiled (project/filter) hot path.
Sourcepub fn record_wasted_build(&self)
pub fn record_wasted_build(&self)
Record a typed layout dropped before any downstream consumer read it.
Sourcepub fn record_selection_attached(&self)
pub fn record_selection_attached(&self)
Record a chunk handed downstream with a selection vector.
Sourcepub fn record_selection_materialized(&self)
pub fn record_selection_materialized(&self)
Record a chunk materialized at a selection boundary.
Sourcepub fn record_selection_materialized_by(&self, op: &'static str)
pub fn record_selection_materialized_by(&self, op: &'static str)
Record a chunk materialized at a named operator boundary.
The hot path is lock-free: it bumps the global counter and, if op
belongs to the closed SELECTION_BOUNDARY_OPS enumeration, the
matching per-operator atomic slot. Unknown labels still count toward
the global materialization total but are not attributed per operator.
Sourcepub fn record_selection_pushed(&self)
pub fn record_selection_pushed(&self)
record an evaluation served by the selection-aware visible-row fast path (selection consumed in place, upstream chunk untouched).
Sourcepub fn materialized_by_operator(&self) -> HashMap<&'static str, u64>
pub fn materialized_by_operator(&self) -> HashMap<&'static str, u64>
materialization sites, attributed per operator.
Sourcepub fn record_column_block_hit(&self)
pub fn record_column_block_hit(&self)
Record a chunk produced via the storage column-block path (A1).
Sourcepub fn record_multiplicity_expanded(&self, n: u64)
pub fn record_multiplicity_expanded(&self, n: u64)
Record n logical rows produced by multiplicity expansion.
Sourcepub fn record_spill(&self, rows: u64, bytes: u64)
pub fn record_spill(&self, rows: u64, bytes: u64)
Record one finalized spill run.
Sourcepub fn record_batch_outlet(&self)
pub fn record_batch_outlet(&self)
Record one chunk emitted through the batch-slice outlet path.
Sourcepub fn record_spill_with_runs(&self, rows: u64, bytes: u64, runs: u64)
pub fn record_spill_with_runs(&self, rows: u64, bytes: u64, runs: u64)
Record aggregated spill output covering runs finalized runs.
Terminal collector paths finalize N runs but report once; passing the
run count keeps spill_runs exact instead of undercounting to 1.
Sourcepub fn hit_rate(&self) -> f64
pub fn hit_rate(&self) -> f64
Fraction of evaluation calls that hit the columnar fast path. Returns 1.0 when nothing was evaluated (vacuous).
Sourcepub fn typed_hit_rate(&self) -> f64
pub fn typed_hit_rate(&self) -> f64
Fraction of evaluations served by the typed batch fast path.
Sourcepub fn selection_passthrough_rate(&self) -> f64
pub fn selection_passthrough_rate(&self) -> f64
Selection passthrough rate: attached / (attached + materialized). 1.0 means every selected chunk reached its consumer without materializing.
Trait Implementations§
Source§impl Debug for ColumnarStats
impl Debug for ColumnarStats
Auto Trait Implementations§
impl !Freeze for ColumnarStats
impl RefUnwindSafe for ColumnarStats
impl Send for ColumnarStats
impl Sync for ColumnarStats
impl Unpin for ColumnarStats
impl UnsafeUnpin for ColumnarStats
impl UnwindSafe for ColumnarStats
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.