mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-24 22:07:23 +01:00
861852f262
### Describe Your Changes - added stale metrics counters for input and output samples - added labels for aggregator metrics => `name="{rwctx}:{aggrId}:{aggrSuffix}"` - rwctx - global or number starting from 1 - aggrid - aggregator id starting from 1 - aggrSuffix - <interval>_(by|without)_label1_label2_labeln e.g: `name="global:1:1m_without_instance_pod"` ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Signed-off-by: hagen1778 <roman@victoriametrics.com> Co-authored-by: hagen1778 <roman@victoriametrics.com>
22 lines
417 B
Go
22 lines
417 B
Go
package streamaggr
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/prompbmarshal"
|
|
)
|
|
|
|
func BenchmarkDeduplicatorPush(b *testing.B) {
|
|
pushFunc := func(_ []prompbmarshal.TimeSeries) {}
|
|
d := NewDeduplicator(pushFunc, time.Hour, nil, "global")
|
|
|
|
b.ReportAllocs()
|
|
b.SetBytes(int64(len(benchSeries)))
|
|
b.RunParallel(func(pb *testing.PB) {
|
|
for pb.Next() {
|
|
d.Push(benchSeries)
|
|
}
|
|
})
|
|
}
|