pub enum ProgressPhase {
Starting,
Loading,
Scanning,
Revalidating,
Indexing,
Analyzing,
Saving,
Summarizing,
}Expand description
Which kind of work a route is doing.
A snapshot carries the phase most recently entered. Routes enter phases in this
order, skipping the ones they do not do: a cold report over a full index goes
Scanning, Indexing once the walk is over, then Analyzing if content was
requested, Saving if a snapshot is written, and Summarizing while the answer is
built (it enters Loading first when it looks for a snapshot and finds none); a
warm one goes Loading, Revalidating, then the same without Indexing;
a cache-only one walks nothing and goes Loading, then Summarizing.
A watch start builds no answer through these phases and ends at its save, if it
writes one. It then
runs a second pass: it verifies the tree once more while it binds observation, and
that pass begins again at Revalidating with the walk counters restarted, so the
line shows the second walk’s own progress rather than a sum.
Variants§
Starting
No route has begun work on this handle.
What a fresh handle reports until the route enters its first phase. A caller polling before then shows a wait, not a phase it has not been told about.
Loading
A metadata snapshot is being read from the cache.
Scanning
The tree is being walked cold.
Revalidating
A loaded snapshot is being verified against the tree.
Indexing
The walk is over and the index is being assembled from the listings it read.
The walkers count as they read, and the thread that assembles the index can still be working through their listings when the last one finishes, so the counters stop moving before the route returns. This phase is what tells a person the walk has finished rather than stalled.
Analyzing
File contents are being read and analyzed.
Saving
A snapshot or content sidecar is being written.
Summarizing
The answer is being built from the index.
The last phase of a one-shot report over a full index. A save entered before it
continues in the background, so the phase names the work in the foreground:
building a heavy view (full, or a deep tree with no limit) over a large index
takes seconds, which Saving would misdescribe.