vendor: update github.com/VictoriaMetrics/metrics from v1.42.0 to v1.43.0

This commit is contained in:
Aliaksandr Valialkin
2026-04-02 14:18:20 +02:00
parent 93d71e7106
commit 815cc97952
5 changed files with 7 additions and 16 deletions

2
go.mod
View File

@@ -10,7 +10,7 @@ require (
github.com/VictoriaMetrics/VictoriaLogs v0.0.0-20260218111324-95b48d57d032
github.com/VictoriaMetrics/easyproto v1.2.0
github.com/VictoriaMetrics/fastcache v1.13.3
github.com/VictoriaMetrics/metrics v1.42.0
github.com/VictoriaMetrics/metrics v1.43.0
github.com/VictoriaMetrics/metricsql v0.85.0
github.com/aws/aws-sdk-go-v2 v1.41.1
github.com/aws/aws-sdk-go-v2/config v1.32.8

4
go.sum
View File

@@ -58,8 +58,8 @@ github.com/VictoriaMetrics/easyproto v1.2.0 h1:FJT9uNXA2isppFuJErbLqD306KoFlehl7
github.com/VictoriaMetrics/easyproto v1.2.0/go.mod h1:QlGlzaJnDfFd8Lk6Ci/fuLxfTo3/GThPs2KH23mv710=
github.com/VictoriaMetrics/fastcache v1.13.3 h1:rBabE0iIxcqKEMCwUmwHZ9dgEqXerg8FRbRDUvC7OVc=
github.com/VictoriaMetrics/fastcache v1.13.3/go.mod h1:hHXhl4DA2fTL2HTZDJFXWgW0LNjo6B+4aj2Wmng3TjU=
github.com/VictoriaMetrics/metrics v1.42.0 h1:t/OGs3BjMUYhxw/h83Z28qAss8DuA4QEVwO4NwJ9hZc=
github.com/VictoriaMetrics/metrics v1.42.0/go.mod h1:xDM82ULLYCYdFRgQ2JBxi8Uf1+8En1So9YUwlGTOqTc=
github.com/VictoriaMetrics/metrics v1.43.0 h1:mtzzl30hG28FtrsqfffKgtf5X3I8CdYCuToSr/bHw6M=
github.com/VictoriaMetrics/metrics v1.43.0/go.mod h1:xDM82ULLYCYdFRgQ2JBxi8Uf1+8En1So9YUwlGTOqTc=
github.com/VictoriaMetrics/metricsql v0.85.0 h1:xI+EfqsOgY0T2yd7p8hcYQ52LOtf+1i8fQQzQ+RGtZM=
github.com/VictoriaMetrics/metricsql v0.85.0/go.mod h1:d4EisFO6ONP/HIGDYTAtwrejJBBeKGQYiRl095bS4QQ=
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=

View File

@@ -13,7 +13,6 @@
package metrics
import (
"bytes"
"fmt"
"io"
"sort"
@@ -43,11 +42,6 @@ func init() {
var (
registeredSets = make(map[*Set]struct{})
registeredSetsLock sync.Mutex
bufPool = sync.Pool{
New: func() any {
return bytes.NewBuffer(make([]byte, 0, 64*1024))
},
}
)
// RegisterSet registers the given set s for metrics export via global WritePrometheus() call.

View File

@@ -35,10 +35,7 @@ func NewSet() *Set {
// WritePrometheus writes all the metrics from s to w in Prometheus format.
func (s *Set) WritePrometheus(w io.Writer) {
// Collect all the metrics in in-memory buffer in order to prevent from long locking due to slow w.
bb := bufPool.Get().(*bytes.Buffer)
bb.Reset()
defer bufPool.Put(bb)
var bb bytes.Buffer
lessFunc := func(i, j int) bool {
// the sorting must be stable.
// see edge cases why we can't simply do `s.a[i].name < s.a[j].name` here:
@@ -80,7 +77,7 @@ func (s *Set) WritePrometheus(w io.Writer) {
if !isMetadataEnabled() {
// Call marshalTo without the global lock, since certain metric types such as Gauge
// can call a callback, which, in turn, can try calling s.mu.Lock again.
nm.metric.marshalTo(nm.name, bb)
nm.metric.marshalTo(nm.name, &bb)
continue
}
@@ -96,7 +93,7 @@ func (s *Set) WritePrometheus(w io.Writer) {
if metricFamily != prevMetricFamily {
// write metadata only once per metric family
metricType := nm.metric.metricType()
writeMetadata(bb, metricFamily, metricType)
writeMetadata(&bb, metricFamily, metricType)
prevMetricFamily = metricFamily
}
bb.Write(metricsWithMetadataBuf.Bytes())

2
vendor/modules.txt vendored
View File

@@ -142,7 +142,7 @@ github.com/VictoriaMetrics/easyproto
# github.com/VictoriaMetrics/fastcache v1.13.3
## explicit; go 1.24.0
github.com/VictoriaMetrics/fastcache
# github.com/VictoriaMetrics/metrics v1.42.0
# github.com/VictoriaMetrics/metrics v1.43.0
## explicit; go 1.24.0
github.com/VictoriaMetrics/metrics
# github.com/VictoriaMetrics/metricsql v0.85.0