vendor: update github.com/VictoriaMetrics/metrics to v1.6.2

This fixes Summary printing for *_count and *_sum values with metric names containing labels.
This commit is contained in:
Aliaksandr Valialkin 2019-06-28 14:16:29 +03:00
parent e8998c69a7
commit 7354f10336
5 changed files with 18 additions and 6 deletions

2
go.mod
View File

@ -2,7 +2,7 @@ module github.com/VictoriaMetrics/VictoriaMetrics
require (
github.com/VictoriaMetrics/fastcache v1.5.1
github.com/VictoriaMetrics/metrics v1.6.1
github.com/VictoriaMetrics/metrics v1.6.2
github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18
github.com/golang/snappy v0.0.1
github.com/spaolacci/murmur3 v1.1.0 // indirect

4
go.sum
View File

@ -3,8 +3,8 @@ github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI
github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
github.com/VictoriaMetrics/fastcache v1.5.1 h1:qHgHjyoNFV7jgucU8QZUuU4gcdhfs8QW1kw68OD2Lag=
github.com/VictoriaMetrics/fastcache v1.5.1/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE=
github.com/VictoriaMetrics/metrics v1.6.1 h1:jHLmdFDuoXJC41FVvYVLoMzRieu7MOxFjYZdPHBN0EQ=
github.com/VictoriaMetrics/metrics v1.6.1/go.mod h1:QZAL5yLaXvhSPeib0ahluGo9VK0HXDZHovKaKlpuWvs=
github.com/VictoriaMetrics/metrics v1.6.2 h1:VMe8c8ZBPgNVZkPoT06LsoU2nb+8e7iPaOWbVRNhxjo=
github.com/VictoriaMetrics/metrics v1.6.2/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/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=

View File

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

View File

@ -4,6 +4,7 @@ import (
"fmt"
"io"
"math"
"strings"
"sync"
"time"
@ -107,11 +108,20 @@ func (sm *Summary) marshalTo(prefix string, w io.Writer) {
sm.mu.Unlock()
if count > 0 {
fmt.Fprintf(w, "%s_sum %g\n", prefix, sum)
fmt.Fprintf(w, "%s_count %d\n", prefix, count)
name, filters := splitMetricName(prefix)
fmt.Fprintf(w, "%s_sum%s %g\n", name, filters, sum)
fmt.Fprintf(w, "%s_count%s %d\n", name, filters, count)
}
}
func splitMetricName(name string) (string, string) {
n := strings.IndexByte(name, '{')
if n < 0 {
return name, ""
}
return name[:n], name[n:]
}
func (sm *Summary) updateQuantiles() {
sm.mu.Lock()
sm.quantileValues = sm.curr.Quantiles(sm.quantileValues[:0], sm.quantiles)

2
vendor/modules.txt vendored
View File

@ -1,6 +1,6 @@
# github.com/VictoriaMetrics/fastcache v1.5.1
github.com/VictoriaMetrics/fastcache
# github.com/VictoriaMetrics/metrics v1.6.1
# github.com/VictoriaMetrics/metrics v1.6.2
github.com/VictoriaMetrics/metrics
# github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18
github.com/cespare/xxhash/v2