Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlidingWindow ¶
func MustNew ¶
func MustNew(window, granularity time.Duration) *SlidingWindow
func (*SlidingWindow) Add ¶
func (sw *SlidingWindow) Add(v int64)
Add increments the value of the current sample.
func (*SlidingWindow) Average ¶
func (sw *SlidingWindow) Average(window time.Duration) float64
Average returns the unweighted mean of the specified window.
func (*SlidingWindow) Stop ¶
func (sw *SlidingWindow) Stop()
Stop the shifter of this sliding time window. A stopped SlidingWindow cannot be started again.
Click to show internal directories.
Click to hide internal directories.