Progress
Live heartbeat for long network-bound runs.
bin/track fetches everything before it renders anything, so a healthy run
and a hung one look identical: no output at all. A Progress writes one dot
per completed request to STDERR, which keeps STDOUT (and therefore every
table the CLI prints) clean and redirectable.
note (and the note: lines the CLI already emits) must go through
Progress#note while progress is enabled: writing a notice directly to
STDERR would land in the middle of a dot run.
Constants
One dot per every ticks; a scan that fires thousands of eth_getLogs
calls must not emit thousands of dots.
Constructors
Instance methods
Closes the dot run and reports how many requests the run made. Called once
from the CLI's ensure, so it still fires when the run raises.
A human-readable notice. Terminates an open dot run first so the notice starts on its own line.
Opens the status line with what the run is about to do. Called before the first request so the program is never silent, even for the first second.
Records one completed request. No-op once disabled, so callers can tick unconditionally.
A dot is the whole output. An earlier version appended a running counter on
a terminal, which turned into an unreadable requests 1 … requests 99 line:
it never overwrote itself and it buried the dots it was meant to accompany.
The exact total is reported once, by finish.