pub struct Statistics {
pub get_direct: u64,
pub get_waited: u64,
pub get_timed_out: u64,
pub connections_created: u64,
pub connections_closed_broken: u64,
pub connections_closed_idle_timeout: u64,
pub connections_closed_max_lifetime: u64,
pub total_wait_time: Duration,
}Expand description
Cumulative counters over a pool’s life. From LocalPool::statistics it is
one thread’s; from Pool::statistics it is the sum across every thread.
Counters only ever grow (connections opened and closed are counted separately), so two snapshots subtracted give the activity in between — the shape a metrics exporter wants.
Fields§
§get_direct: u64get calls served without waiting — an idle connection
was ready, or there was room to open one straight away.
get_waited: u64get calls that had to park for a slot before being
served.
get_timed_out: u64get calls that gave up with
RunError::TimedOut.
connections_created: u64Connections opened by the manager.
connections_closed_broken: u64Connections dropped because has_broken
or is_valid rejected them.
connections_closed_idle_timeout: u64Connections dropped for passing idle_timeout.
connections_closed_max_lifetime: u64Connections dropped for passing max_lifetime.
total_wait_time: DurationTotal time get callers spent parked waiting, across the
get_waited calls.
Implementations§
Source§impl Statistics
impl Statistics
Sourcepub fn average_wait_time(&self) -> Duration
pub fn average_wait_time(&self) -> Duration
Mean time a waiting caller parked, or zero if none ever waited.
Trait Implementations§
Source§impl Clone for Statistics
impl Clone for Statistics
impl Copy for Statistics
Source§impl Debug for Statistics
impl Debug for Statistics
Source§impl Default for Statistics
impl Default for Statistics
impl Eq for Statistics
Source§impl PartialEq for Statistics
impl PartialEq for Statistics
impl StructuralPartialEq for Statistics
Auto Trait Implementations§
impl Freeze for Statistics
impl RefUnwindSafe for Statistics
impl Send for Statistics
impl Sync for Statistics
impl Unpin for Statistics
impl UnsafeUnpin for Statistics
impl UnwindSafe for Statistics
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
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> ⓘ
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> ⓘ
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