mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-14 17:44:06 -08:00
fix build
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
This commit is contained in:
parent
e70780ca86
commit
9b4fbd9552
|
@ -1625,12 +1625,13 @@ func (s *shards) populateReducedTimeSeries(pool *lookupPool, batch []timeSeries,
|
||||||
})
|
})
|
||||||
nPendingSamples++
|
nPendingSamples++
|
||||||
case tExemplar:
|
case tExemplar:
|
||||||
l := make([]prompb.LabelRef, len(d.exemplarLabels))
|
// TODO(npazosmendez) optimize?
|
||||||
for i, el := range d.exemplarLabels {
|
l := make([]prompb.LabelRef, 0, d.exemplarLabels.Len())
|
||||||
|
d.exemplarLabels.Range(func(el labels.Label) {
|
||||||
nRef := pool.intern(el.Name)
|
nRef := pool.intern(el.Name)
|
||||||
vRef := pool.intern(el.Value)
|
vRef := pool.intern(el.Value)
|
||||||
l[i] = prompb.LabelRef{NameRef: nRef, ValueRef: vRef}
|
l = append(l, prompb.LabelRef{NameRef: nRef, ValueRef: vRef})
|
||||||
}
|
})
|
||||||
pendingData[nPending].Exemplars = append(pendingData[nPending].Exemplars, prompb.ExemplarRef{
|
pendingData[nPending].Exemplars = append(pendingData[nPending].Exemplars, prompb.ExemplarRef{
|
||||||
Labels: l,
|
Labels: l,
|
||||||
Value: d.value,
|
Value: d.value,
|
||||||
|
|
Loading…
Reference in a new issue