Documentation ¶
Index ¶
- Constants
- func Add64(a, b uint64) (uint64, error)
- func Diff64(a, b uint64) uint64
- func Max64(max uint64, nums ...uint64) uint64
- func Min(min int, nums ...int) int
- func Min64(min uint64, nums ...uint64) uint64
- func Mul64(a, b uint64) (uint64, error)
- func Sub64(a, b uint64) (uint64, error)
- type Averager
Constants ¶
View Source
const MaxInt = int(^uint(0) >> 1)
MaxInt is defined rather than using math.MaxInt to support go versions < 1.17.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Averager ¶
type Averager interface { // Observe the value at the given time Observe(value float64, currentTime time.Time) // Read returns the average of the provided values. Read() float64 }
Averager tracks a continuous time exponential moving average of the provided values.
func NewAverager ¶
func NewSyncAverager ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.