native histogram: use exemplars in concurrency test
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
parent
67121dc55a
commit
e061dfae88
|
@ -1049,10 +1049,14 @@ func TestNativeHistogramConcurrency(t *testing.T) {
|
||||||
|
|
||||||
go func(vals []float64) {
|
go func(vals []float64) {
|
||||||
start.Wait()
|
start.Wait()
|
||||||
for _, v := range vals {
|
for i, v := range vals {
|
||||||
// An observation every 1 to 10 seconds.
|
// An observation every 1 to 10 seconds.
|
||||||
atomic.AddInt64(&ts, rand.Int63n(10)+1)
|
atomic.AddInt64(&ts, rand.Int63n(10)+1)
|
||||||
his.Observe(v)
|
if i%2 == 0 {
|
||||||
|
his.Observe(v)
|
||||||
|
} else {
|
||||||
|
his.(ExemplarObserver).ObserveWithExemplar(v, Labels{"foo": "bar"})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
end.Done()
|
end.Done()
|
||||||
}(vals)
|
}(vals)
|
||||||
|
|
Loading…
Reference in New Issue