mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 05:04:05 -08:00
fix minor lint issue + use labels Range function since it looks like
the tests fail to do `range labels.Labels` on CI Signed-off-by: Callum Styan <callumstyan@gmail.com> Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
This commit is contained in:
parent
18bf4b8c0e
commit
3e48b8a582
|
@ -26,7 +26,6 @@ import (
|
|||
"github.com/go-kit/log"
|
||||
"github.com/go-kit/log/level"
|
||||
"github.com/gogo/protobuf/proto"
|
||||
|
||||
"github.com/golang/snappy"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/model"
|
||||
|
@ -1474,7 +1473,6 @@ func (s *shards) runShard(ctx context.Context, shardID int, queue *queue) {
|
|||
s.sendMinLenSamples(ctx, pendingMinLenData[:n], symbolTable.LabelsData(), nPendingSamples, nPendingExemplars, nPendingHistograms, pBuf, &buf)
|
||||
symbolTable.clear()
|
||||
}
|
||||
|
||||
}
|
||||
queue.ReturnForReuse(batch)
|
||||
timer.Reset(time.Duration(s.qm.cfg.BatchSendDeadline))
|
||||
|
|
|
@ -1433,9 +1433,9 @@ func createDummyTimeSeries(instances int) []timeSeries {
|
|||
b := labels.NewBuilder(commonLabels)
|
||||
b.Set("pod", "prometheus-"+strconv.Itoa(i))
|
||||
for _, lbls := range metrics {
|
||||
for _, l := range lbls {
|
||||
lbls.Range(func(l labels.Label) {
|
||||
b.Set(l.Name, l.Value)
|
||||
}
|
||||
})
|
||||
result = append(result, timeSeries{
|
||||
seriesLabels: b.Labels(),
|
||||
value: r.Float64(),
|
||||
|
|
Loading…
Reference in a new issue