pub struct OperationTimer { /* private fields */ }Expand description
Helper for timing operations.
Implementations§
Source§impl OperationTimer
impl OperationTimer
Sourcepub fn elapsed_seconds(&self) -> f64
pub fn elapsed_seconds(&self) -> f64
Get the elapsed time in seconds.
Sourcepub fn finish(self, _metrics: &DatabaseMetrics, _success: bool)
pub fn finish(self, _metrics: &DatabaseMetrics, _success: bool)
Finish timing (no-op when otel is disabled).
Trait Implementations§
Source§impl Clone for OperationTimer
impl Clone for OperationTimer
Source§fn clone(&self) -> OperationTimer
fn clone(&self) -> OperationTimer
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 moreAuto Trait Implementations§
impl Freeze for OperationTimer
impl RefUnwindSafe for OperationTimer
impl Send for OperationTimer
impl Sync for OperationTimer
impl Unpin for OperationTimer
impl UnwindSafe for OperationTimer
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