mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
app/vmselect/graphite: fixes tests for arm (#4348)
at arm based CPUs only 9 digits after comma matches for tests.
Especially at holtWinters functions. Since it only takes effect at tests
it makes no sense for changing float prescision at actual functions
(cherry picked from commit 228ea03bda
)
This commit is contained in:
parent
ec97b851bb
commit
e3ce736ce2
@ -3980,6 +3980,7 @@ func compareSeries(ss, ssExpected []*series, expr graphiteql.Expr) error {
|
||||
if !reflect.DeepEqual(s.Timestamps, sExpected.Timestamps) {
|
||||
return fmt.Errorf("unexpected timestamps for series %q\ngot\n%d\nwant\n%d", s.Name, s.Timestamps, sExpected.Timestamps)
|
||||
}
|
||||
|
||||
if !equalFloats(s.Values, sExpected.Values) {
|
||||
return fmt.Errorf("unexpected values for series %q\ngot\n%g\nwant\n%g", s.Name, s.Values, sExpected.Values)
|
||||
}
|
||||
@ -4012,7 +4013,7 @@ func equalFloats(a, b []float64) bool {
|
||||
} else if math.IsNaN(v2) {
|
||||
return false
|
||||
}
|
||||
eps := math.Abs(v1) / 1e15
|
||||
eps := math.Abs(v1) / 1e9
|
||||
if math.Abs(v1-v2) > eps {
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user