pub struct TenantStats { /* private fields */ }Expand description
Statistics for a single tenant
Implementations§
Source§impl TenantStats
impl TenantStats
Sourcepub fn record_query(&self, duration: Duration, rows: u64, success: bool)
pub fn record_query(&self, duration: Duration, rows: u64, success: bool)
Record a query execution
Sourcepub fn record_bytes(&self, read: u64, written: u64)
pub fn record_bytes(&self, read: u64, written: u64)
Record bytes transferred
Sourcepub fn record_connect(&self)
pub fn record_connect(&self)
Record a connection
Sourcepub fn record_disconnect(&self)
pub fn record_disconnect(&self)
Record a disconnection
Sourcepub fn snapshot(&self) -> TenantMetricsSnapshot
pub fn snapshot(&self) -> TenantMetricsSnapshot
Get a snapshot of current stats
Auto Trait Implementations§
impl !Freeze for TenantStats
impl RefUnwindSafe for TenantStats
impl Send for TenantStats
impl Sync for TenantStats
impl Unpin for TenantStats
impl UnsafeUnpin for TenantStats
impl UnwindSafe for TenantStats
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> 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