diff --git a/stat/pool.go b/stat/pool.go index 58b4ebfc..13f460e4 100644 --- a/stat/pool.go +++ b/stat/pool.go @@ -2,6 +2,7 @@ package stat import ( "encoding/hex" + "fmt" "sync" "time" ) @@ -26,10 +27,12 @@ func NewPoolStatistic() *PoolStat { func (s *PoolStat) OperationCallback(nodeKey []byte, endpoint string, method Method, duration time.Duration, err error) { if len(nodeKey) == 0 { // situation when we initialize the client connection and make first EndpointInfo call. + fmt.Println("1111") return } if !IsMethodValid(method) { + fmt.Println("2222") return } @@ -55,10 +58,12 @@ func (s *PoolStat) OperationCallback(nodeKey []byte, endpoint string, method Met s.mu.Unlock() if duration > 0 { + fmt.Println("3333") mon.methods[method].incRequests(duration) } if err != nil { + fmt.Println("4444") mon.incErrorRate() } }