Account for manifest's own size for -size-histogram.

This commit is contained in:
Catherine
2026-04-26 23:14:01 +00:00
parent e8112c1abe
commit 4d8e620846

View File

@@ -27,9 +27,9 @@ func SizeHistogram(ctx context.Context) ([]*DomainStatistics, error) {
statisticsMap[domain] = &DomainStatistics{Domain: domain}
}
statistics := statisticsMap[domain]
statistics.OriginalSize += manifest.GetOriginalSize()
statistics.CompressedSize += manifest.GetCompressedSize()
statistics.StoredSize += manifest.GetStoredSize()
statistics.OriginalSize += metadata.Size + manifest.GetOriginalSize()
statistics.CompressedSize += metadata.Size + manifest.GetCompressedSize()
statistics.StoredSize += metadata.Size + manifest.GetStoredSize()
}
return slices.Collect(maps.Values(statisticsMap)), nil
}