pub struct DiskCli {
pub file_name: String,
pub n: u8,
pub shared: SharedCli,
}
Expand description
测试 磁盘 的 读/写 性能
注意: 文件使用的大小为 2 ^ n * 1GB{n} 默认是: 1GB
在相同的参数下,使用的时间越少越好
Fields§
§file_name: String
测试使用的文件名称{n} 注意: 如果这个文件存在则会被删除
n: u8
实际测试使用的文件最大为 2^n * 1GB{n} 然后取:{n} size / 2 ^ 0 GB{n} size / 2 ^ 1 GB{n} size / 2 ^ 2 GB{n} size / 2 ^ 3 GB{n} size / 2 ^ 4 GB{n} size / 2 ^ 5 GB{n} size / 2 ^ 6 GB{n} size / 2 ^ 7 GB{n} size / 2 ^ 8 GB{n} size / 2 ^ 9 GB{n} size / 2 ^ 10 GB{n} size / 2 ^ 11 GB{n} 进行测试
Implementations§
Trait Implementations§
Source§impl StructOpt for DiskCli
impl StructOpt for DiskCli
Source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Builds the struct from
clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic.Source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere
Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program.Source§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you.Source§fn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
Gets the struct from any iterator such as a
Vec
of your making.
Print the error message and quit the program in case of failure. Read moreAuto Trait Implementations§
impl Freeze for DiskCli
impl RefUnwindSafe for DiskCli
impl Send for DiskCli
impl Sync for DiskCli
impl Unpin for DiskCli
impl UnwindSafe for DiskCli
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