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

Function valueEpsilonCorrect

pkg/testexporter/correctness/simple.go:197–199  ·  view source on GitHub ↗
(f func(time.Time) float64, pair model.SamplePair, testEpsilon float64)

Source from the content-addressed store, hash-verified

195}
196
197func valueEpsilonCorrect(f func(time.Time) float64, pair model.SamplePair, testEpsilon float64) bool {
198 return epsilonCorrect(float64(pair.Value), f(pair.Timestamp.Time()), testEpsilon)
199}
200
201func epsilonCorrect(actual, expected, epsilon float64) bool {
202 delta := math.Abs((actual - expected) / expected)

Callers 1

verifySamplesFunction · 0.85

Calls 1

epsilonCorrectFunction · 0.85

Tested by

no test coverage detected