From debb110a7c9082eae01873a9689b8acae911bf32 Mon Sep 17 00:00:00 2001 From: Srigovind Nayak <5201843+konidev20@users.noreply.github.com> Date: Sat, 3 May 2025 18:08:12 +0530 Subject: [PATCH] check: add percentage of repository checked --- cmd/restic/cmd_check.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/restic/cmd_check.go b/cmd/restic/cmd_check.go index f1c0516c2..6bbaa2747 100644 --- a/cmd/restic/cmd_check.go +++ b/cmd/restic/cmd_check.go @@ -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")