From 4ba86f501a0265e8d9abfd78157f1c9318fc2e22 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 6 Oct 2019 11:18:59 +0300 Subject: [PATCH] vendor: update github.com/VictoriaMetrics/metrics from v1.7.1 to v1.7.2 --- go.mod | 2 +- go.sum | 4 ++-- .../VictoriaMetrics/metrics/.travis.yml | 20 ------------------- .../VictoriaMetrics/metrics/README.md | 2 +- .../VictoriaMetrics/metrics/counter.go | 4 ++-- .../VictoriaMetrics/metrics/gauge.go | 4 ++-- .../github.com/VictoriaMetrics/metrics/set.go | 14 ++++++------- .../VictoriaMetrics/metrics/summary.go | 15 +++++++++----- vendor/modules.txt | 2 +- 9 files changed, 26 insertions(+), 41 deletions(-) delete mode 100644 vendor/github.com/VictoriaMetrics/metrics/.travis.yml diff --git a/go.mod b/go.mod index 152f01581..af42ccc4c 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/VictoriaMetrics/VictoriaMetrics require ( github.com/VictoriaMetrics/fastcache v1.5.1 - github.com/VictoriaMetrics/metrics v1.7.1 + github.com/VictoriaMetrics/metrics v1.7.2 github.com/cespare/xxhash/v2 v2.1.0 github.com/golang/snappy v0.0.1 github.com/google/go-cmp v0.3.0 // indirect diff --git a/go.sum b/go.sum index bc0ca267b..3206fb991 100644 --- a/go.sum +++ b/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.7.1 h1:g2qrY6Upn8rvlvR40cGHFY0crwi4hpqF0n9vJMNsCSg= -github.com/VictoriaMetrics/metrics v1.7.1/go.mod h1:LU2j9qq7xqZYXz8tF3/RQnB2z2MbZms5TDiIg9/NHiQ= +github.com/VictoriaMetrics/metrics v1.7.2 h1:PzC0SEo5lbbNK7xaYwclCCdoaIGRmXOfflIMF3LpSW4= +github.com/VictoriaMetrics/metrics v1.7.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= diff --git a/vendor/github.com/VictoriaMetrics/metrics/.travis.yml b/vendor/github.com/VictoriaMetrics/metrics/.travis.yml deleted file mode 100644 index 39d07e637..000000000 --- a/vendor/github.com/VictoriaMetrics/metrics/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: go - -go: - - 1.12.x - -script: - # build test for supported platforms - - GOOS=linux go build - - GOOS=darwin go build - - GOOS=freebsd go build - - GOOS=windows go build - - GOARCH=386 go build - - # run tests on a standard platform - - go test -v ./... -coverprofile=coverage.txt -covermode=atomic - - go test -v ./... -race - -after_success: - # Upload coverage results to codecov.io - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/VictoriaMetrics/metrics/README.md b/vendor/github.com/VictoriaMetrics/metrics/README.md index 1b4a43e14..0dcb2dff5 100644 --- a/vendor/github.com/VictoriaMetrics/metrics/README.md +++ b/vendor/github.com/VictoriaMetrics/metrics/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/VictoriaMetrics/metrics.svg)](https://travis-ci.org/VictoriaMetrics/metrics) +[![Build Status](https://github.com/VictoriaMetrics/metrics/workflows/main/badge.svg)](https://github.com/VictoriaMetrics/metrics/actions) [![GoDoc](https://godoc.org/github.com/VictoriaMetrics/metrics?status.svg)](http://godoc.org/github.com/VictoriaMetrics/metrics) [![Go Report](https://goreportcard.com/badge/github.com/VictoriaMetrics/metrics)](https://goreportcard.com/report/github.com/VictoriaMetrics/metrics) [![codecov](https://codecov.io/gh/VictoriaMetrics/metrics/branch/master/graph/badge.svg)](https://codecov.io/gh/VictoriaMetrics/metrics) diff --git a/vendor/github.com/VictoriaMetrics/metrics/counter.go b/vendor/github.com/VictoriaMetrics/metrics/counter.go index e6837295a..a7d954923 100644 --- a/vendor/github.com/VictoriaMetrics/metrics/counter.go +++ b/vendor/github.com/VictoriaMetrics/metrics/counter.go @@ -8,7 +8,7 @@ import ( // NewCounter registers and returns new counter with the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -62,7 +62,7 @@ func (c *Counter) marshalTo(prefix string, w io.Writer) { // or creates new counter if the registry doesn't contain counter with // the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo diff --git a/vendor/github.com/VictoriaMetrics/metrics/gauge.go b/vendor/github.com/VictoriaMetrics/metrics/gauge.go index 4b93da152..adc1f21b6 100644 --- a/vendor/github.com/VictoriaMetrics/metrics/gauge.go +++ b/vendor/github.com/VictoriaMetrics/metrics/gauge.go @@ -37,7 +37,7 @@ func (g *Gauge) Get() float64 { func (g *Gauge) marshalTo(prefix string, w io.Writer) { v := g.f() if float64(int64(v)) == v { - // Marshal integer values without scientific notations + // Marshal integer values without scientific notation fmt.Fprintf(w, "%s %d\n", prefix, int64(v)) } else { fmt.Fprintf(w, "%s %g\n", prefix, v) @@ -48,7 +48,7 @@ func (g *Gauge) marshalTo(prefix string, w io.Writer) { // or creates new gauge if the registry doesn't contain gauge with // the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo diff --git a/vendor/github.com/VictoriaMetrics/metrics/set.go b/vendor/github.com/VictoriaMetrics/metrics/set.go index 33a39a0b5..e5206567b 100644 --- a/vendor/github.com/VictoriaMetrics/metrics/set.go +++ b/vendor/github.com/VictoriaMetrics/metrics/set.go @@ -47,7 +47,7 @@ func (s *Set) WritePrometheus(w io.Writer) { // NewCounter registers and returns new counter with the given name in the s. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -64,7 +64,7 @@ func (s *Set) NewCounter(name string) *Counter { // GetOrCreateCounter returns registered counter in s with the given name // or creates new counter if s doesn't contain counter with the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -130,7 +130,7 @@ func (s *Set) NewGauge(name string, f func() float64) *Gauge { // GetOrCreateGauge returns registered gauge with the given name in s // or creates new gauge if s doesn't contain gauge with the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -176,7 +176,7 @@ func (s *Set) GetOrCreateGauge(name string, f func() float64) *Gauge { // NewSummary creates and returns new summary with the given name in s. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -191,7 +191,7 @@ func (s *Set) NewSummary(name string) *Summary { // NewSummaryExt creates and returns new summary in s with the given name, // window and quantiles. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -213,7 +213,7 @@ func (s *Set) NewSummaryExt(name string, window time.Duration, quantiles []float // GetOrCreateSummary returns registered summary with the given name in s // or creates new summary if s doesn't contain summary with the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -231,7 +231,7 @@ func (s *Set) GetOrCreateSummary(name string) *Summary { // window and quantiles in s or creates new summary if s doesn't // contain summary with the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo diff --git a/vendor/github.com/VictoriaMetrics/metrics/summary.go b/vendor/github.com/VictoriaMetrics/metrics/summary.go index def1f4e7b..2c14beae6 100644 --- a/vendor/github.com/VictoriaMetrics/metrics/summary.go +++ b/vendor/github.com/VictoriaMetrics/metrics/summary.go @@ -33,7 +33,7 @@ type Summary struct { // NewSummary creates and returns new summary with the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -48,7 +48,7 @@ func NewSummary(name string) *Summary { // NewSummaryExt creates and returns new summary with the given name, // window and quantiles. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -109,7 +109,12 @@ func (sm *Summary) marshalTo(prefix string, w io.Writer) { if count > 0 { name, filters := splitMetricName(prefix) - fmt.Fprintf(w, "%s_sum%s %g\n", name, filters, sum) + if float64(int64(sum)) == sum { + // Marshal integer sum without scientific notation + fmt.Fprintf(w, "%s_sum%s %d\n", name, filters, int64(sum)) + } else { + fmt.Fprintf(w, "%s_sum%s %g\n", name, filters, sum) + } fmt.Fprintf(w, "%s_count%s %d\n", name, filters, count) } } @@ -132,7 +137,7 @@ func (sm *Summary) updateQuantiles() { // or creates new summary if the registry doesn't contain summary with // the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo @@ -150,7 +155,7 @@ func GetOrCreateSummary(name string) *Summary { // window and quantiles or creates new summary if the registry doesn't // contain summary with the given name. // -// name must be valid Prometheus-compatible metric with possible lables. +// name must be valid Prometheus-compatible metric with possible labels. // For instance, // // * foo diff --git a/vendor/modules.txt b/vendor/modules.txt index e71b5dfb0..393cfd42a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,6 +1,6 @@ # github.com/VictoriaMetrics/fastcache v1.5.1 github.com/VictoriaMetrics/fastcache -# github.com/VictoriaMetrics/metrics v1.7.1 +# github.com/VictoriaMetrics/metrics v1.7.2 github.com/VictoriaMetrics/metrics # github.com/cespare/xxhash/v2 v2.1.0 github.com/cespare/xxhash/v2