MCPcopy Create free account
hub / github.com/github/gh-aw / Mean

Method Mean

pkg/stats/statvar.go:81–86  ·  view source on GitHub ↗

Mean returns the arithmetic mean of all observations, or 0 if none.

()

Source from the content-addressed store, hash-verified

79
80// Mean returns the arithmetic mean of all observations, or 0 if none.
81func (s *StatVar) Mean() float64 {
82 if s.count == 0 {
83 return 0
84 }
85 return s.mean
86}
87
88// SampleVariance returns the sample variance with Bessel's correction (divides
89// by N−1), giving an unbiased estimator when the observations are a random

Callers 13

parseEventsJSONLMetricsFunction · 0.95
CalculateWorkflowHealthFunction · 0.95
TestSpec_PublicAPI_MeanFunction · 0.95
TestStatVar_EmptyFunction · 0.95
TestStatVar_OddCountFunction · 0.95
TestStatVar_EvenCountFunction · 0.95
TestStatVar_AllIdenticalFunction · 0.95

Calls

no outgoing calls

Tested by 10

TestSpec_PublicAPI_MeanFunction · 0.76
TestStatVar_EmptyFunction · 0.76
TestStatVar_OddCountFunction · 0.76
TestStatVar_EvenCountFunction · 0.76
TestStatVar_AllIdenticalFunction · 0.76