Announce each operand on stderr before its passes
All checks were successful
check / check (push) Successful in 6s
All checks were successful
check / check (push) Successful in 6s
With per-operand walk/hash/update cycles, a multi-operand invocation (e.g. scan /srv/*) showed pass totals that looked like the whole run's: an operator watching operand 3 of 14 hash 300k files concluded the other 20M files were being skipped. Print the operand path and its position before each cycle.
This commit is contained in:
8
scan.go
8
scan.go
@@ -108,7 +108,13 @@ func syncScan(db *sql.DB, roots []string, workers int,
|
||||
) (scanStats, error) {
|
||||
var st scanStats
|
||||
|
||||
for _, root := range roots {
|
||||
for i, root := range roots {
|
||||
// Each operand runs its own walk/hash/update sequence, so
|
||||
// announce it: without this, the per-operand pass totals look
|
||||
// like the whole run's.
|
||||
fmt.Fprintf(os.Stderr, "scan: %s (operand %d of %d)\n",
|
||||
root, i+1, len(roots))
|
||||
|
||||
err := syncRoot(db, root, workers, oneFS, &st)
|
||||
if err != nil {
|
||||
return st, err
|
||||
|
||||
Reference in New Issue
Block a user