lint fixes

Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
This commit is contained in:
Nicolás Pazos 2023-12-19 11:47:28 -03:00
parent dc0888c650
commit 66f93860ce
3 changed files with 9 additions and 9 deletions

View file

@ -783,7 +783,7 @@ func labelsToLabelsProto(lbls labels.Labels, buf []prompb.Label) []prompb.Label
return result
}
// TODO
// TODO.
func labelsToUint32SliceStr(lbls labels.Labels, symbolTable *rwSymbolTable, buf []uint32) []uint32 {
result := buf[:0]
lbls.Range(func(l labels.Label) {
@ -795,7 +795,7 @@ func labelsToUint32SliceStr(lbls labels.Labels, symbolTable *rwSymbolTable, buf
return result
}
// TODO
// TODO.
func Uint32StrRefToLabels(symbols []string, minLabels []uint32) labels.Labels {
ls := labels.NewScratchBuilder(len(minLabels) / 2)

View file

@ -387,7 +387,7 @@ type WriteClient interface {
Endpoint() string
}
type RemoteWriteFormat int64
type RemoteWriteFormat int64 //nolint:revive // exported.
const (
Base1 RemoteWriteFormat = iota // original map based format

View file

@ -1474,20 +1474,20 @@ func BenchmarkBuildWriteRequest(b *testing.B) {
}
}
two_batch := createDummyTimeSeries(2)
ten_batch := createDummyTimeSeries(10)
hundred_batch := createDummyTimeSeries(100)
twoBatch := createDummyTimeSeries(2)
tenBatch := createDummyTimeSeries(10)
hundredBatch := createDummyTimeSeries(100)
b.Run("2 instances", func(b *testing.B) {
bench(b, two_batch)
bench(b, twoBatch)
})
b.Run("10 instances", func(b *testing.B) {
bench(b, ten_batch)
bench(b, tenBatch)
})
b.Run("1k instances", func(b *testing.B) {
bench(b, hundred_batch)
bench(b, hundredBatch)
})
}