Struct freebsd_libgeom::Statistics

source ·
pub struct Statistics<'a> { /* private fields */ }
Expand description

Computes statistics between two Snapshots for the same device.

This is equivalent to libgeom’s devstat_compute_statistics function.

Implementations§

source§

impl<'a> Statistics<'a>

source

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.

source

pub fn busy_time(&self) -> f64

source

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.

source

pub fn queue_length(&self) -> u32

Returns the number of incomplete transactions at the time cur was acquired.

source

pub fn total_bytes(&self) -> u64

source

pub fn total_bytes_free(&self) -> u64

source

pub fn total_bytes_read(&self) -> u64

source

pub fn total_bytes_write(&self) -> u64

source

pub fn total_blocks(&self) -> u64

source

pub fn total_blocks_free(&self) -> u64

source

pub fn total_blocks_read(&self) -> u64

source

pub fn total_blocks_write(&self) -> u64

source

pub fn total_transfers(&self) -> u64

source

pub fn total_transfers_free(&self) -> u64

source

pub fn total_transfers_read(&self) -> u64

source

pub fn total_transfers_other(&self) -> u64

source

pub fn total_transfers_write(&self) -> u64

source

pub fn blocks_per_second(&self) -> f64

source

pub fn blocks_per_second_free(&self) -> f64

source

pub fn blocks_per_second_read(&self) -> f64

source

pub fn blocks_per_second_write(&self) -> f64

source

pub fn kb_per_transfer(&self) -> f64

source

pub fn kb_per_transfer_free(&self) -> f64

source

pub fn kb_per_transfer_read(&self) -> f64

source

pub fn kb_per_transfer_write(&self) -> f64

source

pub fn total_duration(&self) -> f64

source

pub fn ms_per_transaction(&self) -> f64

source

pub fn total_duration_free(&self) -> f64

source

pub fn ms_per_transaction_free(&self) -> f64

source

pub fn total_duration_read(&self) -> f64

source

pub fn ms_per_transaction_read(&self) -> f64

source

pub fn total_duration_other(&self) -> f64

source

pub fn ms_per_transaction_other(&self) -> f64

source

pub fn total_duration_write(&self) -> f64

source

pub fn ms_per_transaction_write(&self) -> f64

source

pub fn mb_per_second(&self) -> f64

source

pub fn mb_per_second_free(&self) -> f64

source

pub fn mb_per_second_read(&self) -> f64

source

pub fn mb_per_second_write(&self) -> f64

source

pub fn transfers_per_second(&self) -> f64

source

pub fn transfers_per_second_free(&self) -> f64

source

pub fn transfers_per_second_other(&self) -> f64

source

pub fn transfers_per_second_read(&self) -> f64

source

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.