func()

in stats/basic.go [62:80]


func (s *Basic) SendSucceeded(id string, handler string) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	p, exists := s.pending[id]
	if !exists {
		// This might happen if the set of pending sends grows to large and older sends are dropped, or
		// if part of a send succeeded after the agent was restarted.
		glog.Warningf("stats.Basic: ignoring SendSucceeded from handler %v of unknown report id %v", handler, id)
		return
	}
	p.handlerSuccess(handler)
	if p.isSuccessful() {
		delete(s.pending, id)
		// Reset the "current" failure count: the number of failures since the last success
		s.current.CurrentFailureCount = 0
		// Set the last success time
		s.current.LastReportSuccess = s.clock.Now()
	}
}