pub struct Statistics { /* private fields */ }Expand description
The statistics of the device.
Implementations§
Source§impl Statistics
impl Statistics
Sourcepub fn disk_write_bytes(&self) -> usize
pub fn disk_write_bytes(&self) -> usize
Get the disk cache written bytes.
Sourcepub fn disk_read_bytes(&self) -> usize
pub fn disk_read_bytes(&self) -> usize
Get the disk cache read bytes.
Sourcepub fn disk_write_ios(&self) -> usize
pub fn disk_write_ios(&self) -> usize
Get the disk cache written ios.
Sourcepub fn disk_read_ios(&self) -> usize
pub fn disk_read_ios(&self) -> usize
Get the disk cache read bytes.
Sourcepub fn record_disk_write(&self, bytes: usize)
pub fn record_disk_write(&self, bytes: usize)
Record the write IO and update the statistics.
Sourcepub fn record_disk_read(&self, bytes: usize)
pub fn record_disk_read(&self, bytes: usize)
Record the read IO and update the statistics.
Sourcepub fn read_throttle(&self) -> Duration
pub fn read_throttle(&self) -> Duration
Get the nearest time to retry to check if there is quota for read ops.
Return Duration::ZERO if no need to wait.
Sourcepub fn write_throttle(&self) -> Duration
pub fn write_throttle(&self) -> Duration
Get the nearest time to retry to check if there is quota for write ops.
Return Duration::ZERO if no need to wait.
Sourcepub fn is_read_throttled(&self) -> bool
pub fn is_read_throttled(&self) -> bool
Check if the read ops are throttled.
Sourcepub fn is_write_throttled(&self) -> bool
pub fn is_write_throttled(&self) -> bool
Check if the write ops are throttled.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Statistics
impl RefUnwindSafe for Statistics
impl Send for Statistics
impl Sync for Statistics
impl Unpin for Statistics
impl UnwindSafe for Statistics
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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