Struct progress_observer::Options
source · pub struct Options {
pub checkpoint_size: u64,
pub max_checkpoint_size: Option<u64>,
}Expand description
Optional parameters for creating a new progress observer.
Fields§
§checkpoint_size: u64The checkpoint size represents the number of ticks until the next progress update is emitted.
It is adjusted automatically each printout based on the duration of the work performed, and thus it is typically not necessary to set manually; the default starting checkpoint size of 1 is sufficient for almost any workload, and the checkpoint size will adjust automatically within 1-3 prints to adapt to the workload you’re performing. Specify only if you both have a strong estimate for how many iterations will pass within the timeframe of your specified frequency target, and you actually care about the frequency of those first couple printouts.
max_checkpoint_size: Option<u64>In some instances, such as during particularly chaotic computations, the observer could erroneously derive an exceedingly large size for the next potential checkpoint. In those situations, you might want to specify a maximum number of ticks between progress reports, so that the observer doesn’t get stuck waiting indefinitely after a bad next checkpoint estimate.