MCPcopy Create free account
hub / github.com/cortexproject/cortex / epsilonCorrect

Function epsilonCorrect

pkg/testexporter/correctness/simple.go:201–204  ·  view source on GitHub ↗
(actual, expected, epsilon float64)

Source from the content-addressed store, hash-verified

199}
200
201func epsilonCorrect(actual, expected, epsilon float64) bool {
202 delta := math.Abs((actual - expected) / expected)
203 return delta < epsilon
204}
205
206func calculateMinQueryTime(durationQuerySince time.Duration, timeQueryStart TimeValue) time.Time {
207 minQueryTime := startTime

Callers 2

verifySamplesFunction · 0.85
valueEpsilonCorrectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected