Struct aldrin_broker::BrokerStatistics
source · #[non_exhaustive]pub struct BrokerStatistics {Show 33 fields
pub start: Instant,
pub end: Instant,
pub messages_sent: usize,
pub messages_received: usize,
pub num_connections: usize,
pub connections_added: usize,
pub connections_shut_down: usize,
pub num_objects: usize,
pub objects_created: usize,
pub objects_destroyed: usize,
pub num_services: usize,
pub services_created: usize,
pub services_destroyed: usize,
pub num_function_calls: usize,
pub functions_called: usize,
pub functions_replied: usize,
pub events_received: usize,
pub events_sent: usize,
pub num_channels: usize,
pub channels_created: usize,
pub channels_closed: usize,
pub items_sent: usize,
pub items_dropped: usize,
pub num_bus_listeners: usize,
pub bus_listeners_created: usize,
pub bus_listeners_destroyed: usize,
pub num_bus_listeners_active: usize,
pub bus_listeners_started: usize,
pub bus_listeners_stopped: usize,
pub bus_listener_filters_added: usize,
pub bus_listener_filters_removed: usize,
pub bus_listener_filters_cleared: usize,
pub bus_events_sent: usize,
}
Expand description
Runtime statistics of a broker.
Some of the statistics refer to the duration between start
and
end
. When BrokerHandle::take_statistics
is called, these will be reset to 0.
Also note, that this struct is non_exhaustive
to make future extensions possible.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.start: Instant
The Instant
when the broker started taking these statistics.
end: Instant
The Instant
when the broker stopped taking these statistics.
messages_sent: usize
Number of messages sent by the broker.
This number is not perfectly accurate. It does not cover messages sent during the handshake with a new connection and messages sent under certain shutdown scenarios. Overall, only very few messages are missed.
messages_received: usize
Number of messages received from connections.
This number is not perfectly accurate. It does not cover messages received during the handshake with a new connection and messages received under certain shutdown scenarios. Overall, only very few messages are missed.
num_connections: usize
The number of current connections.
connections_added: usize
The number of new connections added.
connections_shut_down: usize
The number of connections shut down.
num_objects: usize
The number of current objects.
objects_created: usize
The number of objects created.
objects_destroyed: usize
The number of objects destroyed.
num_services: usize
The number of current services.
services_created: usize
The number of services created.
services_destroyed: usize
The number of services destroyed.
num_function_calls: usize
The number of currently pending function calls.
functions_called: usize
The number of functions called.
functions_replied: usize
The number of functions replied.
events_received: usize
The number of events received by the broker.
events_sent: usize
The number of events sent by the broker.
This number is different from events_received
, because a single
event may be sent out zero, one or multiple times, depending on the number of subscribers.
num_channels: usize
The number of current channels.
A channel is counted here as long as at least one end is claimed and not closed.
channels_created: usize
The number of channels created.
channels_closed: usize
The number of channels closed.
items_sent: usize
The number of items sent successfully on a channel.
items_dropped: usize
The number of items dropped a channel.
num_bus_listeners: usize
The number of bus listeners.
bus_listeners_created: usize
The number of bus listeners created.
bus_listeners_destroyed: usize
The number of bus listeners destroyed.
num_bus_listeners_active: usize
The number of bus listeners that are active / have been started.
bus_listeners_started: usize
The number of bus listeners started.
bus_listeners_stopped: usize
The number of bus listeners stopped.
bus_listener_filters_added: usize
The number of bus listener filters added.
bus_listener_filters_removed: usize
The number of bus listener filters removed.
bus_listener_filters_cleared: usize
The number of bus listener filters cleared.
bus_events_sent: usize
The number of bus events sent.
When interpreting this statistic, take note that bus events are sent only once per client, not per bus listener that matches it. Clients then dispatch bus events to individual bus listeners.
Implementations§
source§impl BrokerStatistics
impl BrokerStatistics
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new BrokerStatistics
.
The timestamps start
and end
will be initialized with
Instant::now()
(both have the same value). All other fields are initialized to 0.
Trait Implementations§
source§impl Clone for BrokerStatistics
impl Clone for BrokerStatistics
source§fn clone(&self) -> BrokerStatistics
fn clone(&self) -> BrokerStatistics
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BrokerStatistics
impl Debug for BrokerStatistics
source§impl PartialEq for BrokerStatistics
impl PartialEq for BrokerStatistics
source§fn eq(&self, other: &BrokerStatistics) -> bool
fn eq(&self, other: &BrokerStatistics) -> bool
self
and other
values to be equal, and is used
by ==
.