Skip to content

Commit e061dfa

Browse files
committed
native histogram: use exemplars in concurrency test
Signed-off-by: György Krajcsovits <[email protected]>
1 parent 67121dc commit e061dfa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

prometheus/histogram_test.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -1049,10 +1049,14 @@ func TestNativeHistogramConcurrency(t *testing.T) {
10491049

10501050
go func(vals []float64) {
10511051
start.Wait()
1052-
for _, v := range vals {
1052+
for i, v := range vals {
10531053
// An observation every 1 to 10 seconds.
10541054
atomic.AddInt64(&ts, rand.Int63n(10)+1)
1055-
his.Observe(v)
1055+
if i%2 == 0 {
1056+
his.Observe(v)
1057+
} else {
1058+
his.(ExemplarObserver).ObserveWithExemplar(v, Labels{"foo": "bar"})
1059+
}
10561060
}
10571061
end.Done()
10581062
}(vals)

0 commit comments

Comments
 (0)