pub enum SubCommands {
Mine {Show 18 fields
no_gui: bool,
fps: f32,
progress_message_scrollback_buffer_size: usize,
no_db_download: bool,
io_bound_processors: u32,
cpu_o_bound_processors: u32,
cpu_bound_processors: u32,
repository: Option<PathBuf>,
time_limit: Option<Duration>,
fetch_every: Duration,
fetch_at_most: Option<usize>,
process_every: Duration,
process_at_most: Option<usize>,
report_every: Duration,
report_at_most: Option<usize>,
download_crates_io_database_every_24_hours_starting_at: Option<Time>,
glob: Option<String>,
db_path: PathBuf,
},
Export {
input_db_path: PathBuf,
export_db_path: PathBuf,
},
}Variants§
Mine
Mine crates.io in an incorruptible and resumable fashion
Fields
progress_message_scrollback_buffer_size: usizeThe amount of progress messages to keep in a ring buffer.
no_db_download: boolIf set, the crates-index database for additional metadata will not be downloaded.
It costs a lot of initial processing time and IO when writing changes back to the database, which isn’t helpful while on a slow disk - right now it does so unconditionally and doesn’t track that the work was already done.
io_bound_processors: u32The amount of IO-bound processors to run concurrently.
A way to choose a value is to see which part of the I/O is actually the bottle neck. Depending on that number, one should experiment with an amount of processors that saturate either input or output. Most commonly, these are bound to the input, as it is the network.
cpu_o_bound_processors: u32The amount of CPU- and Output-bound processors to run concurrently.
These will perform a computation followed by flushing its result to disk in the form of multiple small files. It’s recommended to adjust that number to whatever can saturate the speed of writing to disk, as these processors will yield when writing, allowing other processors to compute. Computes are relatively inexpensive compared to the writes.
cpu_bound_processors: u32The amount of CPU-bound processors to run concurrently.
One can assume that one of these can occupy one core of a CPU. However, they will not use a lot of IO, nor will they use much memory.
repository: Option<PathBuf>Path to the possibly existing crates.io repository clone. If unset, it will be cloned to a temporary spot.
time_limit: Option<Duration>The amount of time we can take for the computation. Specified in humantime, like 10s, 5min, or 2h, or ‘3h 2min 2s’
fetch_every: DurationThe time between each fetch operation, specified in humantime, like 10s, 5min, or 2h, or ‘3h 2min 2s’
fetch_at_most: Option<usize>If set, the amount of times the fetch stage will run. If set to 0, it will never run.
process_every: DurationThe time between each processing run, specified in humantime, like 10s, 5min, or 2h, or ‘3h 2min 2s’
process_at_most: Option<usize>If set, the amount of times the process stage will run. If set to 0, they will never run.
report_every: DurationThe time between each reporting and processing run, specified in humantime, like 10s, 5min, or 2h, or ‘3h 2min 2s’
report_at_most: Option<usize>If set, the amount of times the reporting stage will run. If set to 0, they will never run.
download_crates_io_database_every_24_hours_starting_at: Option<Time>If set, declare at which local time to download the crates.io database and digest it.
This job runs every 24h, as the database is updated that often. If unset, the job starts right away. Format is HH:MM, e.g. ‘14:30’ for 2:30 pm or 03:15 for quarter past 3 in the morning.
Export
Export all Criner data into a format friendly for exploration via SQL, best viewed with https://sqlitebrowser.org
Criner stores binary blobs internally and migrates them on the fly, which is optimized for raw performance. It’s also impractical for exploring the data by hand, so the exported data will explode all types into tables with each column being a field. Foreign key relations are set accordingly to allow joins. Use this to get an overview of what’s available, and possibly contribute a report generator which implements a query using raw data and writes it into reports.
Trait Implementations§
Source§impl CommandFactory for SubCommands
impl CommandFactory for SubCommands
Source§impl Debug for SubCommands
impl Debug for SubCommands
Source§impl Default for SubCommands
impl Default for SubCommands
Source§impl FromArgMatches for SubCommands
impl FromArgMatches for SubCommands
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for SubCommands
impl Parser for SubCommands
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Source§impl Subcommand for SubCommands
impl Subcommand for SubCommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for SubCommands
impl RefUnwindSafe for SubCommands
impl Send for SubCommands
impl Sync for SubCommands
impl Unpin for SubCommands
impl UnwindSafe for SubCommands
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
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>
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>
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