Merge pull request #5384 from zmanda/feat-gh-5377-check-add-percentage-for-read-data-subset

check: add percentage of repository checked
This commit is contained in:
Michael Eischer 2025-06-02 19:37:08 +02:00 committed by GitHub
commit 7e51c928c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -425,7 +425,8 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args
subsetSize = repoSize
}
packs = selectRandomPacksByFileSize(chkr.GetPacks(), subsetSize, repoSize)
printer.P("read %d bytes of data packs\n", subsetSize)
percentage := float64(subsetSize) / float64(repoSize) * 100.0
printer.P("read %d bytes (%.1f%%) of data packs\n", subsetSize, percentage)
}
if packs == nil {
return summary, errors.Fatal("internal error: failed to select packs to check")