#[non_exhaustive]pub struct Statistics {
pub get_started: u64,
pub get_direct: u64,
pub get_waited: u64,
pub get_timed_out: u64,
pub get_wait_time: Duration,
pub connections_created: u64,
pub connections_closed_broken: u64,
pub connections_closed_invalid: u64,
pub connections_closed_max_lifetime: u64,
pub connections_closed_idle_timeout: u64,
}Expand description
Statistics about the historical usage of the Pool.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.get_started: u64Total gets started.
This counter is incremented before the get operation starts waiting,
so that it’s possible to monitor the size of the queue by computing the
difference with the other get_* statistics.
get_direct: u64Total gets completed that did not have to wait for a connection.
get_waited: u64Total gets completed that had to wait for a connection available.
get_timed_out: u64Total gets completed that timed out while waiting for a connection.
get_wait_time: DurationTotal time accumulated waiting for a connection.
connections_created: u64Total connections created.
connections_closed_broken: u64Total connections that were closed due to be in broken state.
connections_closed_invalid: u64Total connections that were closed due to be considered invalid.
connections_closed_max_lifetime: u64Total connections that were closed because they reached the max lifetime.
connections_closed_idle_timeout: u64Total connections that were closed because they reached the max idle timeout.
Implementations§
Source§impl Statistics
impl Statistics
Sourcepub fn pending_gets(&self) -> u64
pub fn pending_gets(&self) -> u64
Total pending gets waiting for a connection.
Sourcepub fn completed_gets(&self) -> u64
pub fn completed_gets(&self) -> u64
Total gets completed.