ilm: Make per-tier stats available via admin-tier-info (#13381)

This commit is contained in:
Krishnan Parthasarathi
2021-10-23 21:38:33 -04:00
committed by GitHub
parent 3b9dfa9d29
commit 939fbb3c38
12 changed files with 2029 additions and 386 deletions

View File

@@ -225,6 +225,18 @@ func (o ObjectInfo) Clone() (cinfo ObjectInfo) {
return cinfo
}
func (o ObjectInfo) tierStats() tierStats {
ts := tierStats{
TotalSize: uint64(o.Size),
NumVersions: 1,
}
// the current version of an object is accounted towards objects count
if o.IsLatest {
ts.NumObjects = 1
}
return ts
}
// ReplicateObjectInfo represents object info to be replicated
type ReplicateObjectInfo struct {
ObjectInfo