pub struct LogMetrics {Show 14 fields
pub updates_received: RwLock<u64>,
pub updates_processed: RwLock<u64>,
pub updates_successful: RwLock<u64>,
pub updates_failed: RwLock<u64>,
pub updates_queued: RwLock<u64>,
pub updates_processing_times: RwLock<Vec<u64>>,
pub account_updates_processed: RwLock<u64>,
pub transaction_updates_processed: RwLock<u64>,
pub account_deletions_processed: RwLock<u64>,
pub counters: RwLock<HashMap<String, u64>>,
pub gauges: RwLock<HashMap<String, f64>>,
pub histograms: RwLock<HashMap<String, Vec<f64>>>,
pub start: RwLock<Instant>,
pub last_flush: RwLock<Instant>,
}
Fields§
§updates_received: RwLock<u64>
§updates_processed: RwLock<u64>
§updates_successful: RwLock<u64>
§updates_failed: RwLock<u64>
§updates_queued: RwLock<u64>
§updates_processing_times: RwLock<Vec<u64>>
§account_updates_processed: RwLock<u64>
§transaction_updates_processed: RwLock<u64>
§account_deletions_processed: RwLock<u64>
§counters: RwLock<HashMap<String, u64>>
§gauges: RwLock<HashMap<String, f64>>
§histograms: RwLock<HashMap<String, Vec<f64>>>
§start: RwLock<Instant>
§last_flush: RwLock<Instant>
Implementations§
Source§impl LogMetrics
impl LogMetrics
Trait Implementations§
Source§impl Default for LogMetrics
impl Default for LogMetrics
Source§impl Metrics for LogMetrics
impl Metrics for LogMetrics
Source§fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initializes the metrics system, preparing it for data collection.
Source§fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Flushes any buffered metrics data to ensure all metrics are reported.
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shuts down the metrics system, performing cleanup and ensuring all data
is flushed.
Source§fn increment_counter<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: u64,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn increment_counter<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: u64,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Increments a counter metric by a specified value. Read more
Source§fn update_gauge<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: f64,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_gauge<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: f64,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates a gauge metric, setting its value to represent the current
state. Read more
Source§fn record_histogram<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: f64,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_histogram<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: f64,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Records a value in a histogram metric, representing distribution data. Read more
Auto Trait Implementations§
impl !Freeze for LogMetrics
impl !RefUnwindSafe for LogMetrics
impl Send for LogMetrics
impl Sync for LogMetrics
impl Unpin for LogMetrics
impl !UnwindSafe for LogMetrics
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more