Skip to main content

DEFAULT_SAMPLE_INTERVAL

Constant DEFAULT_SAMPLE_INTERVAL 

Source
pub const DEFAULT_SAMPLE_INTERVAL: Duration;
Expand description

Default interval between FreeSpaceSampler polls.

Tradeoff: responsiveness (catching the dmg-stage high-water mark, which can spike and recede within a couple of seconds) vs syscall frequency. available_bytes is a single cheap statvfs/GetDiskFreeSpaceExW syscall, so 2-3× more samples is negligible cost — and for a feature that must NEVER silently under-report the peak, a 0.5s cadence materially lowers the probability that the high-water mark falls entirely between two polls. The DEFAULT_SAFETY_FACTOR (1.3×) remains the cushion for any residual under-measure between samples. No env override — the const is the single tuning point.