frostfs-node/pkg/local_object_storage/blobstor/metrics.go
Dmitrii Stepanov b510d3b13f
[#9999] blobstor: Add IO tag label to metrics
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-02-24 11:36:15 +03:00

30 lines
1.3 KiB
Go

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