mirror of https://github.com/restic/restic.git
Merge pull request #1961 from mholt/statsoutput
stats: Show what was scanned and scanning mode used
This commit is contained in:
commit
401a564486
|
@ -81,6 +81,10 @@ func runStats(gopts GlobalOptions, args []string) error {
|
|||
}
|
||||
}
|
||||
|
||||
if !gopts.JSON {
|
||||
Printf("scanning...\n")
|
||||
}
|
||||
|
||||
// create a container for the stats (and other needed state)
|
||||
stats := &statsContainer{
|
||||
uniqueFiles: make(map[fileID]struct{}),
|
||||
|
@ -145,6 +149,15 @@ func runStats(gopts GlobalOptions, args []string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// inform the user what was scanned and how it was scanned
|
||||
snapshotsScanned := snapshotIDString
|
||||
if snapshotsScanned == "latest" {
|
||||
snapshotsScanned = "the latest snapshot"
|
||||
} else if snapshotsScanned == "" {
|
||||
snapshotsScanned = "all snapshots"
|
||||
}
|
||||
Printf("Stats for %s in %s mode:\n", snapshotsScanned, countMode)
|
||||
|
||||
if stats.TotalBlobCount > 0 {
|
||||
Printf(" Total Blob Count: %d\n", stats.TotalBlobCount)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue