mirror of
https://github.com/kopia/kopia.git
synced 2026-03-17 21:56:14 -04:00
added Stats.Reset()
This commit is contained in:
@@ -70,6 +70,7 @@ func runBackupCommand(c *kingpin.ParseContext) error {
|
||||
}
|
||||
|
||||
for _, backupDirectory := range sources {
|
||||
conn.Repository.Stats.Reset()
|
||||
log.Printf("Backing up %v", backupDirectory)
|
||||
dir, err := filepath.Abs(backupDirectory)
|
||||
if err != nil {
|
||||
|
||||
@@ -18,3 +18,8 @@ type Stats struct {
|
||||
PresentBlocks int32 `json:"presentBlocks,omitempty"`
|
||||
ValidBlocks int32 `json:"validBlocks,omitempty"`
|
||||
}
|
||||
|
||||
// Reset clears all repository statistics.
|
||||
func (s *Stats) Reset() {
|
||||
*s = Stats{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user