mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 11:28:54 +00:00
stats: Show what was scanned and scanning mode used
This commit is contained in:
parent
49d95e9a50
commit
2d89311d49
@ -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)
|
// create a container for the stats (and other needed state)
|
||||||
stats := &statsContainer{
|
stats := &statsContainer{
|
||||||
uniqueFiles: make(map[fileID]struct{}),
|
uniqueFiles: make(map[fileID]struct{}),
|
||||||
@ -145,6 +149,15 @@ func runStats(gopts GlobalOptions, args []string) error {
|
|||||||
return nil
|
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 {
|
if stats.TotalBlobCount > 0 {
|
||||||
Printf(" Total Blob Count: %d\n", stats.TotalBlobCount)
|
Printf(" Total Blob Count: %d\n", stats.TotalBlobCount)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user