pub struct ConnectionMetrics {
pub executes: AtomicU64,
pub queries: AtomicU64,
pub errors: AtomicU64,
pub execute_us: AtomicU64,
pub query_us: AtomicU64,
}Expand description
Counters tracked by MetricsConnection.
Fields§
§executes: AtomicU64Total number of execute calls.
queries: AtomicU64Total number of query calls.
errors: AtomicU64Total number of errors (execute + query).
execute_us: AtomicU64Total microseconds spent in execute calls.
query_us: AtomicU64Total microseconds spent in query calls.
Implementations§
Source§impl ConnectionMetrics
impl ConnectionMetrics
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Return a snapshot of the metrics as plain integers.
Trait Implementations§
Source§impl Debug for ConnectionMetrics
impl Debug for ConnectionMetrics
Source§impl Default for ConnectionMetrics
impl Default for ConnectionMetrics
Source§fn default() -> ConnectionMetrics
fn default() -> ConnectionMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ConnectionMetrics
impl RefUnwindSafe for ConnectionMetrics
impl Send for ConnectionMetrics
impl Sync for ConnectionMetrics
impl Unpin for ConnectionMetrics
impl UnsafeUnpin for ConnectionMetrics
impl UnwindSafe for ConnectionMetrics
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