From 51bf57743181ece22a920931ae83d721a1a6744a Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 28 Feb 2021 17:42:45 +0200 Subject: [PATCH] vendor: update github.com/VictoriaMetrics/metrics from v1.15.0 to v1.15.1 This can help with https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1096 --- go.mod | 2 +- go.sum | 4 ++-- .../VictoriaMetrics/metrics/histogram.go | 16 ++++++++-------- vendor/modules.txt | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index c11bd80985..5f8f812fc0 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( // Do not use the original github.com/valyala/fasthttp because of issues // like https://github.com/valyala/fasthttp/commit/996610f021ff45fdc98c2ce7884d5fa4e7f9199b github.com/VictoriaMetrics/fasthttp v1.0.12 - github.com/VictoriaMetrics/metrics v1.15.0 + github.com/VictoriaMetrics/metrics v1.15.1 github.com/VictoriaMetrics/metricsql v0.12.0 github.com/aws/aws-sdk-go v1.37.20 github.com/cespare/xxhash/v2 v2.1.1 diff --git a/go.sum b/go.sum index f16da0f576..986d96a208 100644 --- a/go.sum +++ b/go.sum @@ -85,8 +85,8 @@ github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6Ro github.com/VictoriaMetrics/fasthttp v1.0.12 h1:Ag0E119yrH4BTxVyjKD9TeiSImtG9bUcg/stItLJhSE= github.com/VictoriaMetrics/fasthttp v1.0.12/go.mod h1:3SeUL4zwB/p/a9aEeRc6gdlbrtNHXBJR6N376EgiSHU= github.com/VictoriaMetrics/metrics v1.12.2/go.mod h1:Z1tSfPfngDn12bTfZSCqArT3OPY3u88J12hSoOhuiRE= -github.com/VictoriaMetrics/metrics v1.15.0 h1:HGmGaILioC4vNk6UhkcwLIaDlg5y4MVganq1verl5js= -github.com/VictoriaMetrics/metrics v1.15.0/go.mod h1:Z1tSfPfngDn12bTfZSCqArT3OPY3u88J12hSoOhuiRE= +github.com/VictoriaMetrics/metrics v1.15.1 h1:KNYdbuNLh6+1jOOURZPxK9+myoebwv3y6CUPdVxczHE= +github.com/VictoriaMetrics/metrics v1.15.1/go.mod h1:Z1tSfPfngDn12bTfZSCqArT3OPY3u88J12hSoOhuiRE= github.com/VictoriaMetrics/metricsql v0.12.0 h1:NMIu0MPBmGP34g4RUjI1U0xW5XYp7IVNXe9KtZI3PFQ= github.com/VictoriaMetrics/metricsql v0.12.0/go.mod h1:ylO7YITho/Iw6P71oEaGyHbO94bGoGtzWfLGqFhMIg8= github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM= diff --git a/vendor/github.com/VictoriaMetrics/metrics/histogram.go b/vendor/github.com/VictoriaMetrics/metrics/histogram.go index a424c5d3b6..ebdd00d9e3 100644 --- a/vendor/github.com/VictoriaMetrics/metrics/histogram.go +++ b/vendor/github.com/VictoriaMetrics/metrics/histogram.go @@ -86,14 +86,6 @@ func (h *Histogram) Update(v float64) { return } bucketIdx := (math.Log10(v) - e10Min) * bucketsPerDecimal - idx := uint(bucketIdx) - if bucketIdx == float64(idx) { - // Edge case for 10^n values, which must go to the lower bucket - // according to Prometheus logic for `le`-based histograms. - idx-- - } - decimalBucketIdx := idx / bucketsPerDecimal - offset := idx % bucketsPerDecimal h.mu.Lock() h.sum += v if bucketIdx < 0 { @@ -101,6 +93,14 @@ func (h *Histogram) Update(v float64) { } else if bucketIdx >= bucketsCount { h.upper++ } else { + idx := uint(bucketIdx) + if bucketIdx == float64(idx) { + // Edge case for 10^n values, which must go to the lower bucket + // according to Prometheus logic for `le`-based histograms. + idx-- + } + decimalBucketIdx := idx / bucketsPerDecimal + offset := idx % bucketsPerDecimal db := h.decimalBuckets[decimalBucketIdx] if db == nil { var b [bucketsPerDecimal]uint64 diff --git a/vendor/modules.txt b/vendor/modules.txt index aa71cdb231..730d17a125 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -14,7 +14,7 @@ github.com/VictoriaMetrics/fastcache github.com/VictoriaMetrics/fasthttp github.com/VictoriaMetrics/fasthttp/fasthttputil github.com/VictoriaMetrics/fasthttp/stackless -# github.com/VictoriaMetrics/metrics v1.15.0 +# github.com/VictoriaMetrics/metrics v1.15.1 github.com/VictoriaMetrics/metrics # github.com/VictoriaMetrics/metricsql v0.12.0 github.com/VictoriaMetrics/metricsql