vendor: update github.com/valyala/histogram from v1.1.2 to v1.2.0 in order to fix https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1612

This commit is contained in:
Aliaksandr Valialkin 2021-09-15 09:20:11 +03:00
parent 1aa57265d4
commit 2ec4485cad
7 changed files with 19 additions and 10 deletions

2
go.mod
View File

@ -1,5 +1,5 @@
module github.com/VictoriaMetrics/metrics
require github.com/valyala/histogram v1.1.2
require github.com/valyala/histogram v1.2.0
go 1.12

8
go.sum
View File

@ -1,4 +1,4 @@
github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2ObdkI=
github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ=
github.com/valyala/histogram v1.1.2 h1:vOk5VrGjMBIoPR5k6wA8vBaC8toeJ8XO0yfRjFEc1h8=
github.com/valyala/histogram v1.1.2/go.mod h1:CZAr6gK9dbD7hYx2s8WSPh0p5x5wETjC+2b3PJVtEdg=
github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G8=
github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ=
github.com/valyala/histogram v1.2.0 h1:wyYGAZZt3CpwUiIb9AU/Zbllg1llXyrtApRS815OLoQ=
github.com/valyala/histogram v1.2.0/go.mod h1:Hb4kBwb4UxsaNbbbh+RRz8ZR6pdodR57tzWUS3BUzXY=

View File

@ -68,6 +68,11 @@ func (r *RNG) Uint32n(maxN uint32) uint32 {
return uint32((uint64(x) * uint64(maxN)) >> 32)
}
// Seed sets the r state to n.
func (r *RNG) Seed(n uint32) {
r.x = n
}
func getRandomUint32() uint32 {
x := time.Now().UnixNano()
return uint32((x >> 32) ^ x)

View File

@ -2,4 +2,4 @@ module github.com/valyala/histogram
go 1.12
require github.com/valyala/fastrand v1.0.0
require github.com/valyala/fastrand v1.1.0

View File

@ -1,2 +1,2 @@
github.com/valyala/fastrand v1.0.0 h1:LUKT9aKer2dVQNUi3waewTbKV+7H17kvWFNKs2ObdkI=
github.com/valyala/fastrand v1.0.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ=
github.com/valyala/fastrand v1.1.0 h1:f+5HkLW4rsgzdNoleUOB69hyT9IlD2ZQh9GyDMfb5G8=
github.com/valyala/fastrand v1.1.0/go.mod h1:HWqCzkrkg6QXT8V2EXWvXCoow7vLwOFN002oeRzjapQ=

View File

@ -49,6 +49,10 @@ func (f *Fast) Reset() {
f.a = nil
f.tmp = nil
}
// Reset rng state in order to get repeatable results
// for the same sequence of values passed to Fast.Update.
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1612
f.rng.Seed(1)
}
// Update updates the f with v.

4
vendor/modules.txt vendored
View File

@ -1,4 +1,4 @@
# github.com/valyala/fastrand v1.0.0
# github.com/valyala/fastrand v1.1.0
github.com/valyala/fastrand
# github.com/valyala/histogram v1.1.2
# github.com/valyala/histogram v1.2.0
github.com/valyala/histogram