Documentation ¶
Overview ¶
Package stats provides various statistical operations and algorithms.
Index ¶
- func FormatMB(v int, period time.Duration) string
- func Import(named map[string]uint64)
- func LenOf(containerPtr any, mu *sync.RWMutex) func() int
- func RenderHTML() ([]byte, error)
- func UTest(old, new *Sample) (pval float64, err error)
- type AverageParameter
- type AverageValue
- type Distribution
- type Graph
- type Level
- type Link
- type Prometheus
- type Rate
- type Sample
- type StackedGraph
- type UI
- type Val
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderHTML ¶
Types ¶
type AverageParameter ¶
type AverageValue ¶
type AverageValue[T AverageParameter] struct { // contains filtered or unexported fields }
func (*AverageValue[T]) Save ¶
func (av *AverageValue[T]) Save(val T)
func (*AverageValue[T]) Value ¶
func (av *AverageValue[T]) Value() T
type Distribution ¶
type Distribution struct{}
Distribution says to collect/visualize histogram of individual sample distributions.
type Graph ¶
type Graph string
Graph allows to combine multiple related metrics on a single graph.
const NoGraph Graph = ""
NoGraph says to not visualize the metric as a graph.
type Level ¶
type Level int
Level controls if the metric should be printed to console in periodic heartbeat logs, or showed on the simple web interface, or showed in the expert interface only.
type Prometheus ¶
type Prometheus string
Prometheus exports the metric to Prometheus under the given name.
type Rate ¶
type Rate struct{}
Rate says to collect/visualize metric rate per unit of time rather then total value.
type Sample ¶
Sample represents a single sample - set of data points collected during an experiment.
func (*Sample) Percentile ¶
func (*Sample) RemoveOutliers ¶
Remove outliers by the Tukey's fences method.
type StackedGraph ¶
type StackedGraph string
StackedGraph is like Graph, but shows metrics on a stacked graph.