pub struct LogMetrics {
pub duration_ms: Option<f64>,
pub complexity: Option<u32>,
pub items_processed: Option<u64>,
pub cache_hit: Option<bool>,
pub db_queries: Option<u32>,
}Expand description
Performance metrics for a log entry.
Fields§
§duration_ms: Option<f64>Duration in milliseconds
complexity: Option<u32>Query complexity (depth, field count, etc.)
items_processed: Option<u64>Number of items processed
cache_hit: Option<bool>Cache hit indicator
db_queries: Option<u32>Database queries executed
Implementations§
Source§impl LogMetrics
impl LogMetrics
Sourcepub const fn with_duration_ms(self, duration: f64) -> Self
pub const fn with_duration_ms(self, duration: f64) -> Self
Set duration in milliseconds.
Sourcepub const fn with_complexity(self, complexity: u32) -> Self
pub const fn with_complexity(self, complexity: u32) -> Self
Set query complexity.
Sourcepub const fn with_items_processed(self, count: u64) -> Self
pub const fn with_items_processed(self, count: u64) -> Self
Set items processed count.
Sourcepub const fn with_cache_hit(self, hit: bool) -> Self
pub const fn with_cache_hit(self, hit: bool) -> Self
Set cache hit status.
Sourcepub const fn with_db_queries(self, count: u32) -> Self
pub const fn with_db_queries(self, count: u32) -> Self
Set database query count.
Trait Implementations§
Source§impl Clone for LogMetrics
impl Clone for LogMetrics
Source§fn clone(&self) -> LogMetrics
fn clone(&self) -> LogMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LogMetrics
impl Debug for LogMetrics
Source§impl Default for LogMetrics
impl Default for LogMetrics
Source§impl<'de> Deserialize<'de> for LogMetrics
impl<'de> Deserialize<'de> for LogMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LogMetrics
impl RefUnwindSafe for LogMetrics
impl Send for LogMetrics
impl Sync for LogMetrics
impl Unpin for LogMetrics
impl UnsafeUnpin for LogMetrics
impl UnwindSafe for LogMetrics
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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