[#451] frostfs-node: Add cache metrics

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-06-24 18:04:35 +03:00 committed by Evgenii Stratonikov
parent 81ea91de52
commit df894fbac7
4 changed files with 99 additions and 12 deletions

View file

@ -10,7 +10,7 @@ import (
func TestTTLNetCache(t *testing.T) {
ttlDuration := time.Millisecond * 50
cache := newNetworkTTLCache(10, ttlDuration, testNetValueReader)
cache := newNetworkTTLCache(10, ttlDuration, testNetValueReader, &noopCacheMetricts{})
key := "key"
@ -54,3 +54,7 @@ func testNetValueReader(key string) (time.Time, error) {
}
return time.Now(), nil
}
type noopCacheMetricts struct{}
func (m *noopCacheMetricts) AddMethodDuration(method string, d time.Duration, hit bool) {}