pub struct ProgressSnapshot {
pub phase: ProgressPhase,
pub directories: u64,
pub files: u64,
pub bytes: u64,
pub allocated: u64,
pub analysis: Option<(u64, u64)>,
}Expand description
What a route has done so far, as read at one moment.
A view for display, not a consistent cut: each counter is monotonic within a pass
(every route is one pass, except a watch start, whose closing verification begins a
second), but the counters are read one at a time, so a snapshot taken while workers
run can pair a files value with a bytes value from a moment later. The phase is
the one most recently entered.
Fields§
§phase: ProgressPhaseThe kind of work the route is doing.
directories: u64Directories whose listing was read.
files: u64Regular files whose metadata was read.
bytes: u64Apparent bytes of those files.
allocated: u64Allocated bytes of those files. A display should show whichever of the two its answer is measured in: a sparse disk image can be terabytes apparent and megabytes allocated, so apparent bytes beside an allocated answer can exceed the disk.
analysis: Option<(u64, u64)>Content files analyzed so far and the candidates known when analysis began,
or None until a route has begun content analysis.
The one counter with an exact denominator: the candidate set is fixed before the
first file is read, and every candidate produces one result, so the pair reaches
(n, n) when analysis ends. A result the index discards as stale still counts as
analyzed, because the file was read.