()
| 850 | } |
| 851 | |
| 852 | func (s *Server) recordTimeoutSpike() { |
| 853 | s.timeoutSpikeMu.Lock() |
| 854 | defer s.timeoutSpikeMu.Unlock() |
| 855 | now := time.Now() |
| 856 | if now.Sub(s.timeoutSpikeWin) > time.Minute { |
| 857 | s.timeoutSpikeWin = now |
| 858 | s.timeoutSpikeCnt = 0 |
| 859 | } |
| 860 | s.timeoutSpikeCnt++ |
| 861 | } |
| 862 | |
| 863 | func (s *Server) timeoutSpikeActive() bool { |
| 864 | s.timeoutSpikeMu.Lock() |
no outgoing calls
no test coverage detected