[#17] Add morph client metrics

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-06-08 16:37:46 +03:00
parent 90e9247b69
commit 4887f489a1
11 changed files with 182 additions and 15 deletions

View 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) {}