pub struct Cli {
pub command: Commands,
pub verbose: bool,
pub config: Option<PathBuf>,
pub cpu_threads: Option<usize>,
pub io_threads: Option<usize>,
pub storage_type: Option<String>,
pub channel_depth: usize,
}Expand description
Main CLI structure
Fields§
§command: Commands§verbose: boolEnable verbose logging
config: Option<PathBuf>Configuration file path
cpu_threads: Option<usize>Override CPU worker thread count
Controls the number of concurrent CPU-bound operations (compression, encryption). Default: num_cpus - 1 (reserves 1 core for I/O and coordination)
Educational: Setting this too high causes thrashing, too low wastes cores. Monitor CPU saturation metrics to tune appropriately.
io_threads: Option<usize>Override I/O worker thread count
Controls the number of concurrent I/O operations (file reads/writes). Default: Device-specific (NVMe: 24, SSD: 12, HDD: 4)
Educational: This should match your storage device’s queue depth for optimal throughput. Check –storage-type if auto-detection is incorrect.
storage_type: Option<String>Specify storage device type for I/O optimization
Affects default I/O thread count if –io-threads not specified. Values: nvme (queue depth 24), ssd (12), hdd (4) Default: auto-detect based on filesystem characteristics
Educational: Different storage devices have different optimal queue depths. NVMe handles more concurrent I/O than SSD, which handles more than HDD.
channel_depth: usizeChannel depth for pipeline stages (Reader → Workers → Writer)
Controls backpressure in the three-stage pipeline architecture. Default: 4
Educational: Lower values reduce memory usage but may cause stalls. Higher values increase buffering but consume more memory. Optimal value depends on chunk processing time and I/O latency.
Example: If chunk processing = 2ms and I/O = 1ms, depth=4 keeps pipeline full.
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
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 CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
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.