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§
sourcefn read_redelivery_count(&self) -> usize
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.
sourcefn take_redelivery_count(&self) -> usize
fn take_redelivery_count(&self) -> usize
Read and reset the number of request redeliveries.
sourcefn command_queue_len(&self) -> usize
fn command_queue_len(&self) -> usize
Read the number of buffered commands that have not yet been sent to the server.
sourcefn read_latency_metrics(&self) -> Stats
Available on crate feature metrics only.
fn read_latency_metrics(&self) -> Stats
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.
sourcefn take_latency_metrics(&self) -> Stats
Available on crate feature metrics only.
fn take_latency_metrics(&self) -> Stats
metrics only.Read and consume latency metrics, resetting their values afterwards.
sourcefn read_network_latency_metrics(&self) -> Stats
Available on crate feature metrics only.
fn read_network_latency_metrics(&self) -> Stats
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.
sourcefn take_network_latency_metrics(&self) -> Stats
Available on crate feature metrics only.
fn take_network_latency_metrics(&self) -> Stats
metrics only.Read and consume network latency metrics, resetting their values afterwards.
sourcefn read_req_size_metrics(&self) -> Stats
Available on crate feature metrics only.
fn read_req_size_metrics(&self) -> Stats
metrics only.Read request payload size metrics across all commands.
sourcefn take_req_size_metrics(&self) -> Stats
Available on crate feature metrics only.
fn take_req_size_metrics(&self) -> Stats
metrics only.Read and consume request payload size metrics, resetting their values afterwards.
sourcefn read_res_size_metrics(&self) -> Stats
Available on crate feature metrics only.
fn read_res_size_metrics(&self) -> Stats
metrics only.Read response payload size metrics across all commands.
sourcefn take_res_size_metrics(&self) -> Stats
Available on crate feature metrics only.
fn take_res_size_metrics(&self) -> Stats
metrics only.Read and consume response payload size metrics, resetting their values afterwards.