Skip to content

Commit

Permalink
Add Wrapper IsEqualSnapshotCreateStats (#1680)
Browse files Browse the repository at this point in the history
Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>

Signed-off-by: Rajat Gupta <rajat.gupta@veeam.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
r4rajat and mergify[bot] committed Oct 18, 2022
1 parent 7aef8de commit a0734ff
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/kopia/command/parse_command_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,16 @@ func RepoSizeStatsFromBlobStatsRaw(blobStats string) (phySizeTotal int64, blobCo

return int64(sizeValBytes), countVal, nil
}

func IsEqualSnapshotCreateStats(a, b *SnapshotCreateStats) bool {
if a == nil || b == nil {
return a == b
}
return a.FilesHashed == b.FilesHashed &&
a.SizeHashedB == b.SizeHashedB &&
a.FilesCached == b.FilesCached &&
a.SizeCachedB == b.SizeCachedB &&
a.SizeUploadedB == b.SizeUploadedB &&
a.SizeEstimatedB == b.SizeEstimatedB &&
a.ProgressPercent == b.ProgressPercent
}

0 comments on commit a0734ff

Please sign in to comment.