Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Number ¶
type Number interface {
constraints.Integer | constraints.Float
}
Number is an interface representing all numerical types in Go.
type Ring ¶
type Ring[N Number] interface { Put(N) // Put adds a sample to the Ring. Average() float64 // Average computes the average value of all values in the Ring. Percentile(p float32) float64 // Percentile computes a given percentile value of all values in the Ring. }
Ring is an entity capable of keeping only the a number of most recent values.
Click to show internal directories.
Click to hide internal directories.