2023-06-06 09:27:19 +00:00
|
|
|
package meta
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Metrics interface {
|
2023-06-07 11:39:03 +00:00
|
|
|
SetParentID(parentID string)
|
|
|
|
|
2023-06-06 09:27:19 +00:00
|
|
|
SetMode(m mode.Mode)
|
|
|
|
Close()
|
|
|
|
|
|
|
|
AddMethodDuration(method string, d time.Duration, success bool)
|
|
|
|
}
|
|
|
|
|
|
|
|
type noopMetrics struct{}
|
|
|
|
|
2023-06-07 11:39:03 +00:00
|
|
|
func (m *noopMetrics) SetParentID(string) {}
|
2023-06-06 09:27:19 +00:00
|
|
|
func (m *noopMetrics) SetMode(mode.Mode) {}
|
|
|
|
func (m *noopMetrics) Close() {}
|
|
|
|
func (m *noopMetrics) AddMethodDuration(string, time.Duration, bool) {}
|