pub struct PoolStats {
pub size: u32,
pub idle: u32,
pub max_size: u32,
pub active_connections: u32,
pub waiting_for_connection: u32,
pub total_connections_created: u64,
pub connection_errors: u64,
}Fields§
§size: u32§idle: u32§max_size: u32§active_connections: u32§waiting_for_connection: u32§total_connections_created: u64§connection_errors: u64Implementations§
Source§impl PoolStats
impl PoolStats
pub fn utilization_percentage(&self) -> f32
pub fn is_saturated(&self, threshold: f32) -> bool
Sourcepub fn needs_attention(&self) -> bool
pub fn needs_attention(&self) -> bool
Check if pool is at warning level (70% utilization as per requirements)
Sourcepub fn is_critically_saturated(&self) -> bool
pub fn is_critically_saturated(&self) -> bool
Check if pool is critically saturated (90% utilization)
Sourcepub fn health_status(&self) -> String
pub fn health_status(&self) -> String
Get health status message
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PoolStats
impl RefUnwindSafe for PoolStats
impl Send for PoolStats
impl Sync for PoolStats
impl Unpin for PoolStats
impl UnwindSafe for PoolStats
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