mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01:00
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:
parent
e8998c69a7
commit
7354f10336
2
go.mod
2
go.mod
@ -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
4
go.sum
@ -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=
|
||||
|
2
vendor/github.com/VictoriaMetrics/metrics/go.mod
generated
vendored
2
vendor/github.com/VictoriaMetrics/metrics/go.mod
generated
vendored
@ -1,3 +1,5 @@
|
||||
module github.com/VictoriaMetrics/metrics
|
||||
|
||||
require github.com/valyala/histogram v1.0.1
|
||||
|
||||
go 1.12
|
||||
|
14
vendor/github.com/VictoriaMetrics/metrics/summary.go
generated
vendored
14
vendor/github.com/VictoriaMetrics/metrics/summary.go
generated
vendored
@ -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
2
vendor/modules.txt
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user