Struct freebsd_libgeom::Statistics
source · pub struct Statistics<'a> { /* private fields */ }
Expand description
Computes statistics between two Snapshot
s for the same device.
This is equivalent to libgeom’s
devstat_compute_statistics
function.
Implementations§
source§impl<'a> Statistics<'a>
impl<'a> Statistics<'a>
sourcepub fn compute(
current: Devstat<'a>,
previous: Option<Devstat<'a>>,
etime: f64
) -> Self
pub fn compute( current: Devstat<'a>, previous: Option<Devstat<'a>>, etime: f64 ) -> Self
Compute statistics between two Devstat
objects, which must
correspond to the same device, and should come from two separate
snapshots
If prev
is None
, then statistics since boot will be returned.
etime
should be the elapsed time in seconds between the two snapshots.
pub fn busy_time(&self) -> f64
sourcepub fn busy_pct(&self) -> f64
pub fn busy_pct(&self) -> f64
The percentage of time the device had one or more transactions outstanding between the acquisition of the two snapshots.
sourcepub fn queue_length(&self) -> u32
pub fn queue_length(&self) -> u32
Returns the number of incomplete transactions at the time cur
was
acquired.
pub fn total_bytes(&self) -> u64
pub fn total_bytes_free(&self) -> u64
pub fn total_bytes_read(&self) -> u64
pub fn total_bytes_write(&self) -> u64
pub fn total_blocks(&self) -> u64
pub fn total_blocks_free(&self) -> u64
pub fn total_blocks_read(&self) -> u64
pub fn total_blocks_write(&self) -> u64
pub fn total_transfers(&self) -> u64
pub fn total_transfers_free(&self) -> u64
pub fn total_transfers_read(&self) -> u64
pub fn total_transfers_other(&self) -> u64
pub fn total_transfers_write(&self) -> u64
pub fn blocks_per_second(&self) -> f64
pub fn blocks_per_second_free(&self) -> f64
pub fn blocks_per_second_read(&self) -> f64
pub fn blocks_per_second_write(&self) -> f64
pub fn kb_per_transfer(&self) -> f64
pub fn kb_per_transfer_free(&self) -> f64
pub fn kb_per_transfer_read(&self) -> f64
pub fn kb_per_transfer_write(&self) -> f64
pub fn total_duration(&self) -> f64
pub fn ms_per_transaction(&self) -> f64
pub fn total_duration_free(&self) -> f64
pub fn ms_per_transaction_free(&self) -> f64
pub fn total_duration_read(&self) -> f64
pub fn ms_per_transaction_read(&self) -> f64
pub fn total_duration_other(&self) -> f64
pub fn ms_per_transaction_other(&self) -> f64
pub fn total_duration_write(&self) -> f64
pub fn ms_per_transaction_write(&self) -> f64
pub fn mb_per_second(&self) -> f64
pub fn mb_per_second_free(&self) -> f64
pub fn mb_per_second_read(&self) -> f64
pub fn mb_per_second_write(&self) -> f64
pub fn transfers_per_second(&self) -> f64
pub fn transfers_per_second_free(&self) -> f64
pub fn transfers_per_second_other(&self) -> f64
pub fn transfers_per_second_read(&self) -> f64
pub fn transfers_per_second_write(&self) -> f64
Auto Trait Implementations§
impl<'a> Freeze for Statistics<'a>
impl<'a> RefUnwindSafe for Statistics<'a>
impl<'a> !Send for Statistics<'a>
impl<'a> !Sync for Statistics<'a>
impl<'a> Unpin for Statistics<'a>
impl<'a> UnwindSafe for Statistics<'a>
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