Replace restore progress bars with periodic ui.Progress lines
Restore and verify no longer use schollz/progressbar. Instead they emit a periodic status line every 15 s via ui.Writer.Progress, matching the cadence and shape of the snapshot create scanner output. The lines include files done, byte counts, throughput in bits/sec, elapsed, absolute ETA, and remaining duration — same conventions as snapshot create. The progressbar dependency, the newProgressBar/isTerminal helpers, and the unused printfStderr helper are removed; go.mod loses schollz/progressbar plus its colorstring and uniseg transitive deps. Adds --debug timing instrumentation throughout the restore hot path so the next slow-restore report can pinpoint which stage is the bottleneck. Per-file: file-chunks query, output Create, per-chunk blob DB lookups, cache get/put, blob download, chunk write, sweeper call. Per-blob-download: fetch-setup (Get + Stat) vs read+decrypt+decompress vs close-and-verify. FetchBlob splits the Storage.Get and Storage.Stat round-trips so an expensive size-stat is visible separately.
This commit is contained in:
1 parent
d55ddc5914
commit
53febb48d2
5 files changed
+202
-99
No files matched your search
@@ -147,11 +147,6 @@ func (v *Vaultik) printlnStdout(args ...any) {
|
||||
_, _ = fmt.Fprintln(v.Stdout, args...)
|
||||
}
|
||||
|
||||
// printfStderr writes formatted output to stderr.
|
||||
func (v *Vaultik) printfStderr(format string, args ...any) {
|
||||
_, _ = fmt.Fprintf(v.Stderr, format, args...)
|
||||
}
|
||||
|
||||
// scanStdin reads a line of input from stdin.
|
||||
func (v *Vaultik) scanStdin(a ...any) (int, error) {
|
||||
return fmt.Fscanln(v.Stdin, a...)
|
||||
|
||||
Reference in new issue
Block a user