func (s *StatsTracker) MovingPeak() int64 {
	s.lock.Lock()
	defer s.lock.Unlock()

	s.dropOldPoints(s.timeProvider())

	if s.peakPointsHead == nil {
		return 0
	}
	largest := s.peakPointsHead.value
	for _, v := range s.aggregatedPeakPoints {
		if v.value > largest {
			largest = v.value
		}
	}
	return largest
}
// MovingPeak Gets the largest value seen within the time frame
MovingPeak Gets the largest value seen within the time frame
// MovingPeak Gets the largest value seen within the time frame
func (s *StatsTracker) MovingPeak() int64 {
	s.lock.Lock()
	defer s.lock.Unlock()
	s.dropOldPoints(s.timeProvider())
	if s.peakPointsHead == nil {
		return 0
	}
	largest := s.peakPointsHead.value
	for _, v := range s.aggregatedPeakPoints {
		if v.value > largest {
			largest = v.value
		}
	}
	return largest
}
func ( s * StatsTracker ) MovingPeak ( ) int64 { s . lock . Lock ( ) defer s . lock . Unlock ( ) s . dropOldPoints ( s . timeProvider ( ) ) if s . peakPointsHead == nil { return 0 } largest := s . peakPointsHead . value for _ , v := range s . aggregatedPeakPoints { if v . value > largest { largest = v . value } } return largest }
MovingPeak Gets the largest value seen within the time frame
MovingPeak Gets the largest value seen within the time frame