Struct LogMetrics

Source
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

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Default for LogMetrics

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

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,

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,

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,

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,

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,

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,

Records a value in a histogram metric, representing distribution data. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V