Trait fred::interfaces::MetricsInterface

source ·
pub trait MetricsInterface: ClientLike + Sized {
    // Provided methods
    fn read_redelivery_count(&self) -> usize { ... }
    fn take_redelivery_count(&self) -> usize { ... }
    fn command_queue_len(&self) -> usize { ... }
    fn read_latency_metrics(&self) -> Stats { ... }
    fn take_latency_metrics(&self) -> Stats { ... }
    fn read_network_latency_metrics(&self) -> Stats { ... }
    fn take_network_latency_metrics(&self) -> Stats { ... }
    fn read_req_size_metrics(&self) -> Stats { ... }
    fn take_req_size_metrics(&self) -> Stats { ... }
    fn read_res_size_metrics(&self) -> Stats { ... }
    fn take_res_size_metrics(&self) -> Stats { ... }
}
Expand description

Functions that implement the internal metrics interface.

Provided Methods§

source

fn read_redelivery_count(&self) -> usize

Read the number of request redeliveries.

This is the number of times a request had to be sent again due to a connection closing while waiting on a response.

source

fn take_redelivery_count(&self) -> usize

Read and reset the number of request redeliveries.

source

fn command_queue_len(&self) -> usize

Read the number of buffered commands that have not yet been sent to the server.

source

fn read_latency_metrics(&self) -> Stats

Available on crate feature metrics only.

Read latency metrics across all commands.

This metric reflects the total latency experienced by callers, including time spent waiting in memory to be written and network latency. Features such as automatic reconnect and frame serialization time can all affect these values.

source

fn take_latency_metrics(&self) -> Stats

Available on crate feature metrics only.

Read and consume latency metrics, resetting their values afterwards.

source

fn read_network_latency_metrics(&self) -> Stats

Available on crate feature metrics only.

Read network latency metrics across all commands.

This metric only reflects time spent waiting on a response. It will factor in reconnect time if a response doesn’t arrive due to a connection closing, but it does not include the time a command spends waiting to be written, serialization time, backpressure, etc.

source

fn take_network_latency_metrics(&self) -> Stats

Available on crate feature metrics only.

Read and consume network latency metrics, resetting their values afterwards.

source

fn read_req_size_metrics(&self) -> Stats

Available on crate feature metrics only.

Read request payload size metrics across all commands.

source

fn take_req_size_metrics(&self) -> Stats

Available on crate feature metrics only.

Read and consume request payload size metrics, resetting their values afterwards.

source

fn read_res_size_metrics(&self) -> Stats

Available on crate feature metrics only.

Read response payload size metrics across all commands.

source

fn take_res_size_metrics(&self) -> Stats

Available on crate feature metrics only.

Read and consume response payload size metrics, resetting their values afterwards.

Object Safety§

This trait is not object safe.

Implementors§