forked from TrueCloudLab/frostfs-node
[#451] frostfs-node: Add cache metrics
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
81ea91de52
commit
df894fbac7
4 changed files with 99 additions and 12 deletions
|
@ -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) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue