pub struct QuickCli {
pub cpu_n: usize,
pub cpu_round: usize,
pub mem_size: u8,
pub mem_round: usize,
pub disk_file_name: String,
pub disk_n: u8,
pub sqlite_n: usize,
pub shared: SharedCli,
}
Expand description
VPS 性能快速测试
Fields§
§cpu_n: usize
CPU 性能测试{n} 实际计算的次数是 2^n * 1_000_000
cpu_round: usize
CPU 进行多少轮测试
mem_size: u8
内存测试指定内存的大小
mem_round: usize
内存进行多少轮测试
disk_file_name: String
磁盘/SQLite 测试使用的文件名称{n} 注意: 如果这个文件存在则会被删除
disk_n: u8
磁盘测试实际测试使用的文件大小为 2^n * 1GB
sqlite_n: usize
SQLite 测试多少使用多少 百万行数据
Implementations§
Trait Implementations§
Source§impl StructOpt for QuickCli
impl StructOpt for QuickCli
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 QuickCli
impl RefUnwindSafe for QuickCli
impl Send for QuickCli
impl Sync for QuickCli
impl Unpin for QuickCli
impl UnwindSafe for QuickCli
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