go-metrics
go-metrics copied to clipboard
Tests fail on arches ppc64le, aarch64 and s390x
+ go test -buildmode pie -compiler gc -ldflags '-extldflags '\''-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '\'''
--- FAIL: TestEWMA1 (0.00s)
ewma_test.go:64: 3 minute a.Rate(): 0.029872241020718428 != 0.02987224102071842
ewma_test.go:68: 4 minute a.Rate(): 0.01098938333324054 != 0.010989383333240534
ewma_test.go:72: 5 minute a.Rate(): 0.004042768199451294 != 0.004042768199451292
ewma_test.go:76: 6 minute a.Rate(): 0.0014872513059998212 != 0.00148725130599982
ewma_test.go:80: 7 minute a.Rate(): 0.0005471291793327122 != 0.0005471291793327121
ewma_test.go:84: 8 minute a.Rate(): 0.00020127757674150815 != 0.0002012775767415081
ewma_test.go:88: 9 minute a.Rate(): 7.404588245200814e-05 != 7.404588245200811e-05
ewma_test.go:96: 11 minute a.Rate(): 1.0021020474147462e-05 != 1.0021020474147466e-05
ewma_test.go:100: 12 minute a.Rate(): 3.6865274119969525e-06 != 3.686527411996955e-06
ewma_test.go:104: 13 minute a.Rate(): 1.3561976441886433e-06 != 1.356197644188644e-06
ewma_test.go:108: 14 minute a.Rate(): 4.989172314621449e-07 != 4.989172314621452e-07
--- FAIL: TestEWMA5 (0.00s)
ewma_test.go:149: 7 minute a.Rate(): 0.14795817836496392 != 0.1479581783649639
ewma_test.go:169: 12 minute a.Rate(): 0.05443077197364752 != 0.054430771973647527
ewma_test.go:173: 13 minute a.Rate(): 0.04456414692860035 != 0.044564146928600355
ewma_test.go:177: 14 minute a.Rate(): 0.03648603757513079 != 0.036486037575130796
--- FAIL: TestUniformSampleSnapshot (0.00s)
sample_test.go:330: 99th percentile: 9986.429999999998 != 9986.43
--- FAIL: TestUniformSampleStatistics (0.00s)
sample_test.go:330: 99th percentile: 9986.429999999998 != 9986.43
FAIL
exit status 1
FAIL github.com/rcrowley/go-metrics 5.419s
I filed a similar bug last year in https://github.com/VividCortex/ewma/issues/14 Probably the same rounding issue.
Getting the similar issue on s390x for jpmorganchase/quorum with Go.
I have observed this too, on aarch64. I believe this is an example of a precision error:
https://github.com/montanaflynn/stats/issues/33
I took the liberty of cherry-picking @lrita 's fixes to the precisions checks from bb326cd into https://salsa.debian.org/go-team/packages/golang-github-rcrowley-go-metrics/-/blob/master/debian/patches/precision.patch and uploaded it to debian/unstable to fix http://bugs.debian.org/976543 to prevent other unrelated package from falling out of the next Debian release
@lrita I stripped out your optimiziations because I'm not entirely compfortable / familiar enough with the code base to assess their implications fully. Maybe your might would be easier to review if it the precision fixes were kept in a separate PR from the assembler optimizations?
Nice I was ready to implement this to patch the debian bug and removal. I'll go for it with the other problematic package (github.com/montanaflynn/stats)