pub struct ModuleMetrics {
pub reads: BTreeMap<String, ReadMetrics>,
pub writes: BTreeMap<String, WriteMetrics>,
}Expand description
Metrics for a single module/consumer/producer in the message bus.
A module is any component that reads from or writes to topics. This could be a microservice, a worker process, or any logical unit.
Fields§
§reads: BTreeMap<String, ReadMetrics>Metrics for topics this module reads from (subscriptions).
writes: BTreeMap<String, WriteMetrics>Metrics for topics this module writes to (publications).
Implementations§
Source§impl ModuleMetrics
impl ModuleMetrics
Sourcepub fn builder() -> ModuleMetricsBuilder
pub fn builder() -> ModuleMetricsBuilder
Create a builder for module metrics.
Sourcepub fn total_reads(&self) -> u64
pub fn total_reads(&self) -> u64
Total messages read across all topics.
Sourcepub fn total_writes(&self) -> u64
pub fn total_writes(&self) -> u64
Total messages written across all topics.
Trait Implementations§
Source§impl Clone for ModuleMetrics
impl Clone for ModuleMetrics
Source§fn clone(&self) -> ModuleMetrics
fn clone(&self) -> ModuleMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleMetrics
impl Debug for ModuleMetrics
Source§impl Default for ModuleMetrics
impl Default for ModuleMetrics
Source§fn default() -> ModuleMetrics
fn default() -> ModuleMetrics
Returns the “default value” for a type. Read more
Source§impl PartialEq for ModuleMetrics
impl PartialEq for ModuleMetrics
impl StructuralPartialEq for ModuleMetrics
Auto Trait Implementations§
impl Freeze for ModuleMetrics
impl RefUnwindSafe for ModuleMetrics
impl Send for ModuleMetrics
impl Sync for ModuleMetrics
impl Unpin for ModuleMetrics
impl UnwindSafe for ModuleMetrics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more