2023-06-02 13:04:02 +00:00
|
|
|
package fstree
|
|
|
|
|
2024-06-04 13:28:47 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
|
|
|
)
|
2023-06-02 13:04:02 +00:00
|
|
|
|
|
|
|
type Metrics interface {
|
2023-06-07 11:39:03 +00:00
|
|
|
SetParentID(parentID string)
|
|
|
|
|
2024-06-04 13:28:47 +00:00
|
|
|
SetMode(mode mode.ComponentMode)
|
2023-06-02 13:04:02 +00:00
|
|
|
Close()
|
|
|
|
|
|
|
|
Iterate(d time.Duration, success bool)
|
2024-09-10 08:47:42 +00:00
|
|
|
IterateInfo(d time.Duration, success bool)
|
2023-06-02 13:04:02 +00:00
|
|
|
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)
|
2024-03-12 14:36:26 +00:00
|
|
|
ObjectsCount(d time.Duration, success bool)
|
2023-06-02 13:04:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type noopMetrics struct{}
|
|
|
|
|
2023-06-07 11:39:03 +00:00
|
|
|
func (m *noopMetrics) SetParentID(string) {}
|
2024-06-04 13:28:47 +00:00
|
|
|
func (m *noopMetrics) SetMode(mode.ComponentMode) {}
|
2023-06-02 13:04:02 +00:00
|
|
|
func (m *noopMetrics) Close() {}
|
|
|
|
func (m *noopMetrics) Iterate(time.Duration, bool) {}
|
2024-09-10 08:47:42 +00:00
|
|
|
func (m *noopMetrics) IterateInfo(time.Duration, bool) {}
|
2023-06-02 13:04:02 +00:00
|
|
|
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) {}
|
2024-03-12 14:36:26 +00:00
|
|
|
func (m *noopMetrics) ObjectsCount(time.Duration, bool) {}
|