fs: Accumulate stats when using --dry-run

Fixes #4624
This commit is contained in:
Ingo Weiss
2020-12-29 21:11:12 +00:00
committed by Nick Craig-Wood
parent ba51409c3c
commit 1d40bc1901
2 changed files with 16 additions and 0 deletions
+6
View File
@@ -280,6 +280,12 @@ func (acc *Account) ServerSideCopyEnd(n int64) {
acc.stats.Bytes(n)
}
// DryRun accounts for statistics without running the operation
func (acc *Account) DryRun(n int64) {
acc.ServerSideCopyStart()
acc.ServerSideCopyEnd(n)
}
// Account for n bytes from the current file bandwidth limit (if any)
func (acc *Account) limitPerFileBandwidth(n int) {
acc.values.mu.Lock()