forked from TrueCloudLab/frostfs-node
[#17] Add morph client metrics
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
90e9247b69
commit
4887f489a1
11 changed files with 182 additions and 15 deletions
17
pkg/morph/metrics/metrics.go
Normal file
17
pkg/morph/metrics/metrics.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
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) {}
|
Loading…
Add table
Add a link
Reference in a new issue