[#1658] engine: Update metrics interfaces

It now supports typed object counter metrics.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-09-09 14:37:35 +03:00 committed by LeL
parent 175e2b9fa0
commit edef26a4fd
2 changed files with 10 additions and 10 deletions

View file

@ -17,8 +17,8 @@ type MetricRegister interface {
AddSearchDuration(d time.Duration)
AddListObjectsDuration(d time.Duration)
SetObjectCounter(shardID string, v uint64)
AddToObjectCounter(shardID string, delta int)
SetObjectCounter(shardID, objectType string, v uint64)
AddToObjectCounter(shardID, objectType string, delta int)
}
func elapsed(addFunc func(d time.Duration)) func() {