pub struct ExecutionStats {
pub total_duration: Duration,
pub phase_durations: Vec<Duration>,
pub query_count: usize,
pub rows_fetched: usize,
pub parallel_phases: usize,
pub avg_query_time: Duration,
pub peak_memory_mb: Option<f64>,
}Expand description
Statistics about query plan execution
Fields§
§total_duration: DurationTotal execution time
phase_durations: Vec<Duration>Time spent on each phase
query_count: usizeNumber of queries executed
rows_fetched: usizeTotal rows fetched
parallel_phases: usizeNumber of phases executed in parallel
avg_query_time: DurationAverage response time per query
peak_memory_mb: Option<f64>Peak memory usage (if available)
Implementations§
Source§impl ExecutionStats
impl ExecutionStats
pub fn new() -> Self
Sourcepub fn calculate_averages(&mut self)
pub fn calculate_averages(&mut self)
Calculate average query time
Sourcepub fn add_phase_duration(&mut self, duration: Duration)
pub fn add_phase_duration(&mut self, duration: Duration)
Add phase duration
Trait Implementations§
Source§impl Clone for ExecutionStats
impl Clone for ExecutionStats
Source§fn clone(&self) -> ExecutionStats
fn clone(&self) -> ExecutionStats
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 ExecutionStats
impl Debug for ExecutionStats
Auto Trait Implementations§
impl Freeze for ExecutionStats
impl RefUnwindSafe for ExecutionStats
impl Send for ExecutionStats
impl Sync for ExecutionStats
impl Unpin for ExecutionStats
impl UnwindSafe for ExecutionStats
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