Skip to main content

EventQueueRecorder

Trait EventQueueRecorder 

Source
pub trait EventQueueRecorder: Send + Sync {
    // Required methods
    fn queue_time(&self, waited: Duration);
    fn processing_time(&self, took: Duration);
    fn operation_started(&self);
    fn operation_timed_out(&self);
    fn idle_time(&self, idle: Duration);
}
Expand description

Receives the engine loop’s event-queue measurements. Every method is called from the engine task, so an implementation must not block.

Required Methods§

Source

fn queue_time(&self, waited: Duration)

A command waited waited between its send and the turn that started it: Kafka’s EventQueueTimeMs.

Source

fn processing_time(&self, took: Duration)

An event ran for took, to its commit reply for a write: Kafka’s EventQueueProcessingTimeMs.

Source

fn operation_started(&self)

The loop started an event: Kafka’s EventQueueOperationsStartedCount.

Source

fn operation_timed_out(&self)

The loop reached a command whose caller had already stopped waiting for the reply: Kafka’s EventQueueOperationsTimedOutCount. Kafka drops an event whose deadline passed in the queue; the engine still runs the command, so it also counts as started.

Source

fn idle_time(&self, idle: Duration)

The loop waited idle for its next event. Its rate is Kafka’s AvgIdleRatio.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§