pub struct CompilationMetrics { /* private fields */ }Expand description
Global metrics for the JIT compilation pipeline.
All counters are atomic and use Relaxed ordering for minimal overhead
(< 5ns per increment). Intended for dashboards and diagnostics, not
for correctness-critical decisions.
Implementations§
Source§impl CompilationMetrics
impl CompilationMetrics
Sourcepub fn record_compiled(&self, compile_time_ns: u64)
pub fn record_compiled(&self, compile_time_ns: u64)
Records a successful JIT compilation.
Sourcepub fn record_fallback(&self)
pub fn record_fallback(&self)
Records a fallback to interpreted execution (plan not compilable).
Sourcepub fn record_error(&self)
pub fn record_error(&self)
Records a compilation error.
Sourcepub fn compiled_count(&self) -> u64
pub fn compiled_count(&self) -> u64
Returns the number of successfully compiled queries.
Sourcepub fn fallback_count(&self) -> u64
pub fn fallback_count(&self) -> u64
Returns the number of fallback queries.
Sourcepub fn error_count(&self) -> u64
pub fn error_count(&self) -> u64
Returns the number of errored queries.
Sourcepub fn compile_time_total_ns(&self) -> u64
pub fn compile_time_total_ns(&self) -> u64
Returns total compilation time in nanoseconds.
Sourcepub fn total_queries(&self) -> u64
pub fn total_queries(&self) -> u64
Returns total number of queries (compiled + fallback + error).
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Takes a snapshot of all metrics.
Trait Implementations§
Source§impl Debug for CompilationMetrics
impl Debug for CompilationMetrics
Auto Trait Implementations§
impl !Freeze for CompilationMetrics
impl RefUnwindSafe for CompilationMetrics
impl Send for CompilationMetrics
impl Sync for CompilationMetrics
impl Unpin for CompilationMetrics
impl UnsafeUnpin for CompilationMetrics
impl UnwindSafe for CompilationMetrics
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.