vendor: update github.com/VictoriaMetrics/metrics from v1.8.0 to v1.8.1

This commit is contained in:
Aliaksandr Valialkin 2019-11-23 00:49:08 +02:00
parent 9d1fcb2be6
commit ef25e1b049
4 changed files with 18 additions and 11 deletions

2
go.mod
View file

@ -4,7 +4,7 @@ require (
cloud.google.com/go v0.49.0 // indirect
cloud.google.com/go/storage v1.4.0
github.com/VictoriaMetrics/fastcache v1.5.2
github.com/VictoriaMetrics/metrics v1.8.0
github.com/VictoriaMetrics/metrics v1.8.1
github.com/aws/aws-sdk-go v1.25.37
github.com/cespare/xxhash/v2 v2.1.1
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect

4
go.sum
View file

@ -24,8 +24,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE
github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
github.com/VictoriaMetrics/fastcache v1.5.2 h1:Erd8iIuBAL9kke8JzM4+WxkKuFkHh3ktwLanJvDgR44=
github.com/VictoriaMetrics/fastcache v1.5.2/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE=
github.com/VictoriaMetrics/metrics v1.8.0 h1:UnkixfF43kt0v8GRgkgFC6Ti+G0yvT9H1o5vNgaOv9k=
github.com/VictoriaMetrics/metrics v1.8.0/go.mod h1:LU2j9qq7xqZYXz8tF3/RQnB2z2MbZms5TDiIg9/NHiQ=
github.com/VictoriaMetrics/metrics v1.8.1 h1:miHseb2n+HNDPWx6uEKBqGubeC/By5vIRmU/gpYA9FQ=
github.com/VictoriaMetrics/metrics v1.8.1/go.mod h1:LU2j9qq7xqZYXz8tF3/RQnB2z2MbZms5TDiIg9/NHiQ=
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8=
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/aws/aws-sdk-go v1.25.37 h1:gBtB/F3dophWpsUQKN/Kni+JzYEH2mGHF4hWNtfED1w=

View file

@ -132,12 +132,12 @@ func (h *Histogram) marshalBucket(prefix string, w io.Writer, idx int) {
if v == 0 {
return
}
start := float64(0)
start := "0"
if idx > 0 {
start = getRangeEndFromBucketIdx(uint(idx - 1))
}
end := getRangeEndFromBucketIdx(uint(idx))
tag := fmt.Sprintf(`vmrange="%g...%g"`, start, end)
tag := fmt.Sprintf(`vmrange="%s...%s"`, start, end)
prefix = addTag(prefix, tag)
name, filters := splitMetricName(prefix)
fmt.Fprintf(w, "%s_vmbucket%s %d\n", name, filters, v)
@ -180,20 +180,27 @@ func getBucketIdx(v float64) uint {
return 1 + m + uint(e10-e10Min)*9
}
func getRangeEndFromBucketIdx(idx uint) float64 {
func getRangeEndFromBucketIdx(idx uint) string {
if idx == 0 {
return 0
return "0"
}
if idx == 1 {
return math.Pow10(e10Min)
return fmt.Sprintf("1e%d", e10Min)
}
if idx >= bucketsCount-1 {
return math.Inf(1)
return "+Inf"
}
idx -= 2
e10 := e10Min + int(idx/9)
m := 2 + (idx % 9)
return math.Pow10(e10) * float64(m)
if m == 10 {
e10++
m = 1
}
if e10 == 0 {
return fmt.Sprintf("%d", m)
}
return fmt.Sprintf("%de%d", m, e10)
}
// Each range (10^n..10^(n+1)] for e10Min<=n<=e10Max is split into 9 equal sub-ranges, plus 3 additional buckets:

2
vendor/modules.txt vendored
View file

@ -12,7 +12,7 @@ cloud.google.com/go/storage
github.com/BurntSushi/toml
# github.com/VictoriaMetrics/fastcache v1.5.2
github.com/VictoriaMetrics/fastcache
# github.com/VictoriaMetrics/metrics v1.8.0
# github.com/VictoriaMetrics/metrics v1.8.1
github.com/VictoriaMetrics/metrics
# github.com/aws/aws-sdk-go v1.25.37
github.com/aws/aws-sdk-go/aws