Struct Disktest

Source
pub struct Disktest { /* private fields */ }
Expand description

Disktest core.

Implementations§

Source§

impl Disktest

Source

pub const UNLIMITED: u64 = 18_446_744_073_709_551_615u64

Unlimited max_bytes.

Source

pub fn new( algorithm: DtStreamType, seed: &[u8], round_id: u64, invert_pattern: bool, nr_threads: usize, quiet_level: DisktestQuiet, abort: Option<Arc<AtomicBool>>, ) -> Disktest

Create a new Disktest instance.

Parameters:

  • algorithm: Select the algorithm to generate the random data stream that is written to disk. If unsure, use Default::default().
  • seed: The seed for the random data stream generator.
  • round_id: The disk test round. Every round gets a unique data stream. If unsure, use 0 (first round).
  • invert_pattern: Bitwise invert the random data stream. If unsure, use false (don’t invert).
  • nr_threads: The number of threads to spawn when generating the random data stream. The special value 0 means: Use all CPUs available in the system. If unsure, use 1 (One CPU).
  • quiet_level: The console verbosity of the Disktest code. See DisktestQuiet.
  • abort: If this optional flag is set to true (e.g. by another thread) the Disktest process will abort as soon as possible. If unsure, use None.
Source

pub fn write( &mut self, file: DisktestFile, seek: u64, max_bytes: u64, ) -> Result<u64>

Run disktest in write mode.

Source

pub fn verify( &mut self, file: DisktestFile, seek: u64, max_bytes: u64, ) -> Result<u64>

Run disktest in verify mode.

Auto Trait Implementations§

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>,

Source§

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>,

Source§

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V