mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
937ae2ca90
### 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>
(cherry picked from commit 861852f262
)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
21 lines
417 B
Go
21 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)
|
|
}
|
|
})
|
|
}
|