Stat prints the statistic message of the State object.
(id proto.DatabaseID)
| 729 | |
| 730 | // Stat prints the statistic message of the State object. |
| 731 | func (s *State) Stat(id proto.DatabaseID) { |
| 732 | var ( |
| 733 | p = func() *pool { |
| 734 | s.RLock() |
| 735 | defer s.RUnlock() |
| 736 | return s.pool |
| 737 | }() |
| 738 | fc = atomic.LoadInt32(&p.failedRequestCount) |
| 739 | tc = atomic.LoadInt32(&p.trackerCount) |
| 740 | ) |
| 741 | log.WithFields(log.Fields{ |
| 742 | "database_id": id, |
| 743 | "pooled_fail_request_count": fc, |
| 744 | "pooled_query_tracker": tc, |
| 745 | }).Info("xeno pool stats") |
| 746 | } |