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

pub trait Instrumentation {
Show 19 methods fn pool_added(&self, pool: PoolId);
fn pool_removed(&self, pool: PoolId);
fn checked_out_connection(
        &self,
        idle_for: Duration,
        time_since_checkout_request: Duration,
        pool: PoolId
    );
fn checked_in_returned_connection(
        &self,
        flight_time: Duration,
        pool: PoolId
    );
fn checked_in_new_connection(&self, pool: PoolId);
fn connection_dropped(
        &self,
        flight_time: Option<Duration>,
        lifetime: Duration,
        pool: PoolId
    );
fn connection_created(
        &self,
        connected_after: Duration,
        total_time: Duration,
        pool: PoolId
    );
fn idle_inc(&self, pool: PoolId);
fn idle_dec(&self, pool: PoolId);
fn in_flight_inc(&self, pool: PoolId);
fn in_flight_dec(&self, pool: PoolId);
fn reservation_added(&self, pool: PoolId);
fn reservation_fulfilled(
        &self,
        reservation_time: Duration,
        checkout_request_time: Duration,
        pool: PoolId
    );
fn reservation_not_fulfilled(
        &self,
        reservation_time: Duration,
        checkout_request_time: Duration,
        pool: PoolId
    );
fn reservation_limit_reached(&self, pool: PoolId);
fn connection_factory_failed(&self, pool: PoolId);
fn internal_message_received(&self, latency: Duration, pool: PoolId);
fn checkout_message_received(&self, latency: Duration, pool: PoolId);
fn relevant_message_processed(
        &self,
        processing_time: Duration,
        pool: PoolId
    );
}
Expand description

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

Required methods

A connection was checked out

A connection that was previously checked out was checked in again

A newly created connection was checked in

A connection was dropped because it was marked as defect

A new connection was created

The number of idle connections increased by 1

The number of idle connections decreased by 1

The number of in flight connections increased by 1

The number of in flight connections decreased by 1

A reservation has been enqueued

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

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

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

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

A pool internal message was received

Implementors