pub struct BenchArgs {
pub inputs: Vec<String>,
pub formats: Vec<String>,
pub levels: bool,
pub per_file: bool,
pub threads: Option<usize>,
pub memory_limit: Option<String>,
pub repeat: u32,
pub json: bool,
pub csv: bool,
pub table_only: bool,
}Expand description
The arguments of stuffr bench.
Fields§
§inputs: Vec<String>Files to benchmark, or quoted glob patterns ('logs/*.log').
A path that exists is used as is; one that does not and contains
*, ? or [ is expanded, its matches sorted. A directory is
refused: name its files instead. So is a pipe or device: bench needs
each file’s size, so write a pipe to a file first. A file it cannot
open, a dangling symlink or an unreadable directory on the way is
refused too, naming the path.
formats: Vec<String>Only these formats, comma-separated or repeated. Default: every codec this build can write with its real encoder.
levels: boolRun every level of each format instead of its default level only.
per_file: boolCompress each file as its own stream instead of all of them as one.
threads: Option<usize>Compress with N worker threads. 0 means auto-detect.
Threads apply to compression only: decompression is always timed single-threaded. OMITTING this flag is not the same as passing 0: without it, stuffr compresses single-threaded, so the same input always produces the same bytes on any machine. Multi-threaded xz and zstd split the input per worker, so their output depends on the worker count. bench ignores STUFFR_THREADS: threads come only from this flag.
memory_limit: Option<String>Cap the memory stuffr will ask for, e.g. 512M or 2G.
Input over half of it is streamed from disk rather than held in
memory. Each codec gets the output destination its own worst case
allows: a codec whose worst-case output is too large for the rest
writes to a temp file, whose writes then count in its compress time,
and its row is marked (*; output: disk). Defaults to 25%
of available RAM, honouring cgroup limits.
repeat: u32Time each row N times and report the medians.
json: boolEmit one machine-readable JSON object instead of the table.
csv: boolEmit CSV, one line per row, instead of the table.
table_only: boolPrint the table alone: no input line, no winners, no progress.
Trait Implementations§
Source§impl Args for BenchArgs
impl Args for BenchArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for BenchArgs
impl FromArgMatches for BenchArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.