frostfs-node/pkg/local_object_storage/blobstor/fstree/metrics.go
Dmitrii Stepanov b66ea2c713
Some checks failed
DCO action / DCO (pull_request) Successful in 1m51s
Build / Build Components (1.21) (pull_request) Successful in 3m7s
Vulncheck / Vulncheck (pull_request) Successful in 3m27s
Tests and linters / Lint (pull_request) Failing after 4m18s
Build / Build Components (1.20) (pull_request) Successful in 4m40s
Tests and linters / gopls check (pull_request) Successful in 6m40s
Tests and linters / Staticcheck (pull_request) Successful in 7m10s
Tests and linters / Tests (1.20) (pull_request) Successful in 7m48s
Tests and linters / Tests (1.21) (pull_request) Successful in 7m58s
Tests and linters / Tests with -race (pull_request) Successful in 8m32s
[#1029] metabase: Add refill metrics
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-04-09 19:47:46 +03:00

31 lines
1 KiB
Go

package fstree
import "time"
type Metrics interface {
SetParentID(parentID string)
SetMode(readOnly bool)
Close()
Iterate(d time.Duration, success bool)
Delete(d time.Duration, success bool)
Exists(d time.Duration, success bool)
Put(d time.Duration, size int, success bool)
Get(d time.Duration, size int, success bool)
GetRange(d time.Duration, size int, success bool)
ObjectsCount(d time.Duration, success bool)
}
type noopMetrics struct{}
func (m *noopMetrics) SetParentID(string) {}
func (m *noopMetrics) SetMode(bool) {}
func (m *noopMetrics) Close() {}
func (m *noopMetrics) Iterate(time.Duration, bool) {}
func (m *noopMetrics) Delete(time.Duration, bool) {}
func (m *noopMetrics) Exists(time.Duration, bool) {}
func (m *noopMetrics) Put(time.Duration, int, bool) {}
func (m *noopMetrics) Get(time.Duration, int, bool) {}
func (m *noopMetrics) GetRange(time.Duration, int, bool) {}
func (m *noopMetrics) ObjectsCount(time.Duration, bool) {}