pub struct Metrics {}
Expand description
A stateless struct that provides a clean, organized API for updating
the application’s global Prometheus metrics via the metrics
facade.
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn set_keys_total(tree: &str, value: u64)
pub fn set_keys_total(tree: &str, value: u64)
Sets the current number of keys for a given tree.
Sourcepub fn inc_keys_total(tree: &str)
pub fn inc_keys_total(tree: &str)
Sets the current number of keys for a given tree.
Sourcepub fn dec_keys_total(tree: &str)
pub fn dec_keys_total(tree: &str)
Sets the current number of keys for a given tree.
Sourcepub fn increment_operations(op: &str)
pub fn increment_operations(op: &str)
Increments the counter for a specific database operation.
Sourcepub fn set_disk_size(bytes: f64)
pub fn set_disk_size(bytes: f64)
Sets the current total disk size of the database.
Sourcepub fn set_backup_size(bytes: f64)
pub fn set_backup_size(bytes: f64)
Sets the size of the last successful backup.
Sourcepub fn increment_ttl_expired_keys()
pub fn increment_ttl_expired_keys()
Increments the counter for expired TTL keys.
Sourcepub fn inc_amount_keys_total(tree: &str, value: u64)
pub fn inc_amount_keys_total(tree: &str, value: u64)
Sets the current number of keys for a given tree.
Sourcepub fn dec_amount_keys_total(tree: &str, amount: u64)
pub fn dec_amount_keys_total(tree: &str, amount: u64)
Sets the current number of keys for a given tree.
Sourcepub fn increment_amount_operations(op: &str, amount: u64)
pub fn increment_amount_operations(op: &str, amount: u64)
Increments the counter for a specific database operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
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