[#1658] node: Support object counter metrics

Increment shard's object counter on successful `Put` calls and decrement on
`Delete`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-08-19 19:49:09 +03:00 committed by fyrchik
parent 067ab44e0b
commit 745f72fff0
7 changed files with 87 additions and 15 deletions

View file

@ -16,6 +16,8 @@ type MetricRegister interface {
AddRangeDuration(d time.Duration)
AddSearchDuration(d time.Duration)
AddListObjectsDuration(d time.Duration)
AddToObjectCounter(shardID string, delta int)
}
func elapsed(addFunc func(d time.Duration)) func() {