From 66f93860ce48e731472e293a6e89abde5e77b908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Pazos?= Date: Tue, 19 Dec 2023 11:47:28 -0300 Subject: [PATCH] lint fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Pazos --- storage/remote/codec.go | 4 ++-- storage/remote/queue_manager.go | 2 +- storage/remote/queue_manager_test.go | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/storage/remote/codec.go b/storage/remote/codec.go index 9d53b952f..6cd30a836 100644 --- a/storage/remote/codec.go +++ b/storage/remote/codec.go @@ -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) diff --git a/storage/remote/queue_manager.go b/storage/remote/queue_manager.go index f5f8b3101..37c9cd0ba 100644 --- a/storage/remote/queue_manager.go +++ b/storage/remote/queue_manager.go @@ -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 diff --git a/storage/remote/queue_manager_test.go b/storage/remote/queue_manager_test.go index be3f1f5ff..93dc3f0fd 100644 --- a/storage/remote/queue_manager_test.go +++ b/storage/remote/queue_manager_test.go @@ -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) }) }