forked from TrueCloudLab/frostfs-node
Dmitrii Stepanov
26b305f82b
Use separate morph cache metrics for node and IR Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
21 lines
714 B
Go
21 lines
714 B
Go
package metrics
|
|
|
|
import "time"
|
|
|
|
type Register interface {
|
|
IncSwitchCount()
|
|
SetLastBlock(uint32)
|
|
IncNotificationCount(notificationType string)
|
|
ObserveInvoke(typ string, contract string, method string, success bool, d time.Duration)
|
|
}
|
|
|
|
type NoopRegister struct{}
|
|
|
|
func (NoopRegister) IncSwitchCount() {}
|
|
func (NoopRegister) SetLastBlock(uint32) {}
|
|
func (NoopRegister) IncNotificationCount(string) {}
|
|
func (NoopRegister) ObserveInvoke(string, string, string, bool, time.Duration) {}
|
|
|
|
type NoopMorphCacheMetrics struct{}
|
|
|
|
func (m *NoopMorphCacheMetrics) AddMethodDuration(string, bool, time.Duration) {}
|