[#312] wc: Add metrics
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
4503a61997
commit
d212d908b5
10 changed files with 130 additions and 14 deletions
42
pkg/local_object_storage/writecache/metrics.go
Normal file
42
pkg/local_object_storage/writecache/metrics.go
Normal file
|
@ -0,0 +1,42 @@
|
|||
package writecache
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
||||
)
|
||||
|
||||
type storageType string
|
||||
|
||||
const (
|
||||
storageTypeUndefined storageType = "null"
|
||||
storageTypeDB storageType = "db"
|
||||
storageTypeFSTree storageType = "fstree"
|
||||
)
|
||||
|
||||
type Metrics interface {
|
||||
Get(d time.Duration, success bool, st storageType)
|
||||
Delete(d time.Duration, success bool, st storageType)
|
||||
Put(d time.Duration, success bool, st storageType)
|
||||
Flush(success bool, st storageType)
|
||||
Evict(st storageType)
|
||||
|
||||
Estimate(db, fstree uint64)
|
||||
SetMode(m mode.Mode)
|
||||
}
|
||||
|
||||
type metricsStub struct{}
|
||||
|
||||
func (s *metricsStub) Get(time.Duration, bool, storageType) {}
|
||||
|
||||
func (s *metricsStub) Delete(time.Duration, bool, storageType) {}
|
||||
|
||||
func (s *metricsStub) Put(time.Duration, bool, storageType) {}
|
||||
|
||||
func (s *metricsStub) Estimate(uint64, uint64) {}
|
||||
|
||||
func (s *metricsStub) SetMode(mode.Mode) {}
|
||||
|
||||
func (s *metricsStub) Flush(bool, storageType) {}
|
||||
|
||||
func (s *metricsStub) Evict(storageType) {}
|
Loading…
Add table
Add a link
Reference in a new issue