fix(cli): added output to indicate completion of snapshot verification (#3275)

This commit is contained in:
Jarek Kowalski
2023-09-06 19:53:16 -07:00
committed by GitHub
parent c9e8347821
commit 06af162394
2 changed files with 8 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ func (c *commandSnapshotVerify) run(ctx context.Context, rep repo.Repository) er
}
v := snapshotfs.NewVerifier(ctx, rep, opts)
defer v.ShowFinalStats(ctx)
//nolint:wrapcheck
return v.InParallel(ctx, func(tw *snapshotfs.TreeWalker) error {

View File

@@ -49,6 +49,13 @@ func (v *Verifier) ShowStats(ctx context.Context) {
verifierLog(ctx).Infof("Processed %v objects.", processed)
}
// ShowFinalStats logs final verification statistics.
func (v *Verifier) ShowFinalStats(ctx context.Context) {
processed := v.processed.Load()
verifierLog(ctx).Infof("Finished processing %v objects.", processed)
}
// VerifyFile verifies a single file object (using content check, blob map check or full read).
func (v *Verifier) VerifyFile(ctx context.Context, oid object.ID, entryPath string) error {
verifierLog(ctx).Debugf("verifying object %v", oid)