mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-11 14:53:49 +00:00
21 lines
420 B
Go
21 lines
420 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, 2, time.Hour, nil, "global")
|
|
|
|
b.ReportAllocs()
|
|
b.SetBytes(int64(len(benchSeries)))
|
|
b.RunParallel(func(pb *testing.PB) {
|
|
for pb.Next() {
|
|
d.Push(benchSeries)
|
|
}
|
|
})
|
|
}
|