[#312] wc: Add metrics

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-05-18 17:19:41 +03:00 committed by Evgenii Stratonikov
parent 4503a61997
commit d212d908b5
10 changed files with 130 additions and 14 deletions

View file

@ -9,7 +9,10 @@ import (
)
func (c *cache) estimateCacheSize() uint64 {
return c.objCounters.DB()*c.smallObjectSize + c.objCounters.FS()*c.maxObjectSize
db := c.objCounters.DB() * c.smallObjectSize
fstree := c.objCounters.FS() * c.maxObjectSize
c.metrics.Estimate(db, fstree)
return db + fstree
}
func (c *cache) incSizeDB(sz uint64) uint64 {