[Test] TSDB: BenchmarkResizeExemplar multiple per series

One exemplar per series is not a typical workload. Make it the same as
`BenchmarkAddExemplar`.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
Bryan Boreham 2024-05-11 17:00:32 +01:00
parent 929fbf860e
commit f0c50b5a66

View file

@ -482,8 +482,11 @@ func BenchmarkResizeExemplars(b *testing.B) {
require.NoError(b, err) require.NoError(b, err)
es := exs.(*CircularExemplarStorage) es := exs.(*CircularExemplarStorage)
var l labels.Labels
for i := 0; i < int(float64(tc.startSize)*float64(1.5)); i++ { for i := 0; i < int(float64(tc.startSize)*float64(1.5)); i++ {
l := labels.FromStrings("service", strconv.Itoa(i)) if i%100 == 0 {
l = labels.FromStrings("service", strconv.Itoa(i))
}
err = es.AddExemplar(l, exemplar.Exemplar{Value: float64(i), Ts: int64(i)}) err = es.AddExemplar(l, exemplar.Exemplar{Value: float64(i), Ts: int64(i)})
if err != nil { if err != nil {