MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / average

Function average

tests/loadtest/tools/queue_benchmark.go:601–610  ·  view source on GitHub ↗
(values []float64)

Source from the content-addressed store, hash-verified

599}
600
601func average(values []float64) float64 {
602 if len(values) == 0 {
603 return 0
604 }
605 var sum float64
606 for _, value := range values {
607 sum += value
608 }
609 return sum / float64(len(values))
610}
611
612func percentile(values []float64, pct float64) float64 {
613 if len(values) == 0 {

Callers 1

trendStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected