pub struct BackendMetrics { /* private fields */ }Expand description
Metrics for storage backends.
Implementations§
Source§impl BackendMetrics
impl BackendMetrics
Sourcepub fn new(id: &str, backend_type: &str) -> Arc<Self>
pub fn new(id: &str, backend_type: &str) -> Arc<Self>
Create a BackendMetrics object for a storage backend.
Sourcepub fn release(&self) -> Result<(), MetricsError>
pub fn release(&self) -> Result<(), MetricsError>
Release a BackendMetrics object for a storage backend.
Sourcepub fn begin(&self) -> SystemTime
pub fn begin(&self) -> SystemTime
Mark starting of an IO operations.
Sourcepub fn end(&self, begin: &SystemTime, size: usize, error: bool)
pub fn end(&self, begin: &SystemTime, size: usize, error: bool)
Mark ending of an IO operations.
Trait Implementations§
Source§impl Debug for BackendMetrics
impl Debug for BackendMetrics
Source§impl Default for BackendMetrics
impl Default for BackendMetrics
Source§fn default() -> BackendMetrics
fn default() -> BackendMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for BackendMetrics
impl RefUnwindSafe for BackendMetrics
impl Send for BackendMetrics
impl Sync for BackendMetrics
impl Unpin for BackendMetrics
impl UnwindSafe for BackendMetrics
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