Struct progress_observer::Options
source · pub struct Options {
pub first_checkpoint: u64,
pub max_checkpoint_size: Option<u64>,
pub delay: u64,
pub max_scale_factor: f64,
}Expand description
Optional parameters for creating a new progress observer.
Fields§
§first_checkpoint: u64Number of ticks before sending the first report.
Typically not necessary to set manually; the default starting checkpoint size of 1 should be sufficient for most workloads, and the checkpoint size should adjust automatically within 1-3 prints to adapt to the workload you’re performing. In some cases, if the initial iterations have a moderately chaotic execution time, setting this value higher than 1 will prevent the first checkpoint estimate from being excessively large. If the reporter seems to fail to work properly using the default settings, adjust this value up as a first fix. Specify if you have a general estimate for how many iterations will pass within the timeframe of your specified frequency target.
max_checkpoint_size: Option<u64>Specify a maximum number of ticks to wait for in between observations.
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.
delay: u64Delay observations for this many initial ticks.
Sometimes your computation needs time to “warm up”, where the first 1 or 2 iterations may take significantly longer to process than all subsequent ones. This may throw off the checkpoint estimation. Specify this argument to ignore the first n ticks processed, only beginning to record progress after they have elapsed.
max_scale_factor: f64Maximum factor that subsequent checkpoints are allowed to increase in size by.
Intended to prevent sudden large jumps in checkpoint size between reports. The default value of 2 is generally fine for most cases. Panics if the factor is set less than 1.