mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
[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:
parent
929fbf860e
commit
f0c50b5a66
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue