1 Commits
Author SHA1 Message Date
sneak ab9ca809b3 Show the progress rate over the last 5 seconds, and where a phase waits after 10 seconds with no item done (closes #125)
check / check (push) Canceled after 0s
The rate was the phase's average, so a burst after a long wait read as
over 1,000 files a second. It now covers the items completed over the
last 5 seconds, or since the line before off a terminal; the ETA still
comes from the average. Once no item has completed for 10 seconds, the
rate gives way to "stalled" and where the phase waits, as "stalled
disk/db": disk, db, out (stdout) or cpu, or two of them. A line too
wide for the terminal loses its bar first, then its rate or those
words, so the phase, progress, elapsed time and ETA stay whole. The
content phase's last partial batch is now written under a display of
its own. The tests set the display's clock by hand.

Deviation: the stall words hold no time and name where the phase waits, not what it does.
Judgement call: trees' group phase, which works in memory, says "cpu".

Model: opus-5-5
2026-10-16 22:47:32 +00:00
2 changed files with 16 additions and 12 deletions
+11 -9
View File
@@ -878,15 +878,17 @@ Additional requirements:
terminal is. A line too wide for the terminal first loses its bar, which gives terminal is. A line too wide for the terminal first loses its bar, which gives
way to the spinner, then its rate, the words of a stalled phase, or what the way to the spinner, then its rate, the words of a stalled phase, or what the
phase is waiting for. The phase and its place, the progress, the elapsed time phase is waiting for. The phase and its place, the progress, the elapsed time
and the ETA are kept whole. On an 80-column terminal, a stalled line at counts and the ETA are kept whole. On an 80-column terminal, at counts like those of
and times like those of the stalled line in the example above keeps its words the stalled line in the example above, a stalled line keeps its words whenever
whole in every phase; where the words and the ETA do not both fit, as at the elapsed time and the ETA are both in minutes, except in the content
millions of files and times in hours, the words give way. Only when those four phase's checks and reads. Their lines are the widest, and at most times in
alone are too wide, as on a terminal narrower than about 70 columns hours into minutes they lose the words. Where the words and the ETA do not both fit, as
a scan of millions of files, is the line cut short at the terminal's edge, so at millions of files and times in hours, the words give way. Only when those
the end of the ETA is lost first. A terminal made narrower while a phase runs four alone are too wide, as on a terminal narrower than about 70 columns hours
gets the same: the next draw erases the line within the new width and fits the into a scan of millions of files, is the line cut short at the terminal's
line to it, and the display goes on redrawing in place. edge, so the end of the ETA is lost first. A terminal made narrower while a
phase runs gets the same: the next draw erases the line within the new width
and fits the line to it, and the display goes on redrawing in place.
- When stderr is not a terminal (a pipe, a file, `/dev/null`), do not emit ANSI - When stderr is not a terminal (a pipe, a file, `/dev/null`), do not emit ANSI
redraws: print the line the moment each phase starts, every 5 seconds while it redraws: print the line the moment each phase starts, every 5 seconds while it
runs (whether or not an item has completed, and never more often), and once runs (whether or not an item has completed, and never more often), and once
+5 -3
View File
@@ -38,9 +38,11 @@
`db`, `out` for stdout or `cpu`, or two of them for a phase that may wait on `db`, `out` for stdout or `cpu`, or two of them for a phase that may wait on
either, each phase giving its word where it is defined. A line too wide for either, each phase giving its word where it is defined. A line too wide for
the terminal loses its bar first, then its rate or those words, so the phase, the terminal loses its bar first, then its rate or those words, so the phase,
progress, elapsed time and ETA stay whole; on an 80-column terminal the words progress, elapsed time and ETA stay whole. On an 80-column terminal, at counts
fit beside them in an ordinary scan. The content phase's last partial batch is like those of README's example, the content phase's checks and reads lose
now written under a display of its own (2026-10-16, those words at most times in minutes, and every other phase keeps them
whenever the elapsed time and the ETA are both in minutes. The content phase's
last partial batch is now written under a display of its own (2026-10-16,
https://git.eeqj.de/sneak/sfdupes/issues/125) https://git.eeqj.de/sneak/sfdupes/issues/125)
- new subcommand `info` prints the database's details on stdout, one per line as - new subcommand `info` prints the database's details on stdout, one per line as