pub struct Metrics { /* private fields */ }Implementations§
Source§impl Metrics
impl Metrics
pub fn new(ring_capacity: usize) -> Self
pub fn record_hot_hit(&self)
pub fn record_hot_miss(&self)
pub fn record_cold_fallback(&self)
pub fn record_migration_down(&self)
pub fn record_migration_up(&self)
pub fn record_migration_failed(&self)
pub fn record_migration_rollback(&self)
pub fn record_restore_enqueued(&self)
pub fn record_feedback(&self)
pub fn record_search_latency(&self, ns: u64)
pub fn hit_rate(&self) -> f64
pub fn avg_latency_ms(&self) -> f64
pub fn p99_latency_ms(&self) -> f64
pub fn snapshot(&self) -> HashMap<String, u64>
Sourcepub fn to_prometheus(&self) -> String
pub fn to_prometheus(&self) -> String
导出Prometheus文本格式
Auto Trait Implementations§
impl Freeze for Metrics
impl !RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin 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