[][src]Trait reool::instrumentation::Instrumentation

pub trait Instrumentation {
    fn checked_out_connection(&self);
fn checked_in_returned_connection(&self, flight_time: Duration);
fn checked_in_new_connection(&self);
fn connection_dropped(&self, flight_time: Duration, lifetime: Duration);
fn connection_created(
        &self,
        connected_after: Duration,
        total_time: Duration
    );
fn connection_killed(&self, lifetime: Duration);
fn reservation_added(&self);
fn reservation_fulfilled(&self, after: Duration);
fn reservation_not_fulfilled(&self, after: Duration);
fn reservation_limit_reached(&self);
fn connection_factory_failed(&self);
fn stats(&self, stats: PoolStats); }

A trait with methods that get called by the pool on certain events.

Required methods

fn checked_out_connection(&self)

A connection was checked out

fn checked_in_returned_connection(&self, flight_time: Duration)

A connection that was previously checked out was checked in again

fn checked_in_new_connection(&self)

A newly created connection was checked in

fn connection_dropped(&self, flight_time: Duration, lifetime: Duration)

A connection was dropped because it was marked as defect

fn connection_created(&self, connected_after: Duration, total_time: Duration)

A new connection was created

fn connection_killed(&self, lifetime: Duration)

A connection was intentionally killed. Happens when connections are removed.

fn reservation_added(&self)

A reservation has been enqueued

fn reservation_fulfilled(&self, after: Duration)

A reservation was fulfilled. A connection was available in time.

fn reservation_not_fulfilled(&self, after: Duration)

A reservation was not fulfilled. A connection was mostly not available in time.

fn reservation_limit_reached(&self)

The reservation queue has a limit and that limit was just reached. This means a checkout has instantaneously failed.

fn connection_factory_failed(&self)

The connection factory was asked to create a new connection but it failed to do so.

fn stats(&self, stats: PoolStats)

Statistics from the pool

Loading content...

Implementors

impl Instrumentation for StatsLogger[src]

impl Instrumentation for NoInstrumentation[src]

Loading content...