pub struct PerformanceCounter { /* private fields */ }Expand description
Performance counter
Implementations§
Source§impl PerformanceCounter
impl PerformanceCounter
Sourcepub fn record_request_start(&self) -> Instant
pub fn record_request_start(&self) -> Instant
Record request start
Sourcepub fn record_request_complete(&self, start: Instant, success: bool)
pub fn record_request_complete(&self, start: Instant, success: bool)
Record request completion
Sourcepub fn get_stats(&self) -> PerformanceStats
pub fn get_stats(&self) -> PerformanceStats
Get statistics
Trait Implementations§
Source§impl Clone for PerformanceCounter
impl Clone for PerformanceCounter
Source§fn clone(&self) -> PerformanceCounter
fn clone(&self) -> PerformanceCounter
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 PerformanceCounter
impl RefUnwindSafe for PerformanceCounter
impl Send for PerformanceCounter
impl Sync for PerformanceCounter
impl Unpin for PerformanceCounter
impl UnsafeUnpin for PerformanceCounter
impl UnwindSafe for PerformanceCounter
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