Skip to content

Commit

Permalink
Apply some more intrange fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Carlo Teubner <carlo@cteubner.net>
  • Loading branch information
c4rlo committed Jan 25, 2025
1 parent 9a6dad5 commit 19fe2ee
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pkg/common/telemetry/metrics_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,55 +63,55 @@ func BenchmarkStatsd(b *testing.B) {

func benchmarkMetricImpl(b *testing.B, m Metrics) {
b.Run("SetGauge", func(b *testing.B) {
for n := 0; n < b.N; n++ {
for range b.N {
m.SetGauge(key, valf)
}
})

b.Run("SetGaugeWithLabels", func(b *testing.B) {
for n := 0; n < b.N; n++ {
for range b.N {
m.SetGaugeWithLabels(key, valf, labels)
}
})

b.Run("EmitKey", func(b *testing.B) {
for n := 0; n < b.N; n++ {
for range b.N {
m.EmitKey(key, valf)
}
})

b.Run("IncrCounter", func(b *testing.B) {
for n := 0; n < b.N; n++ {
for range b.N {
m.IncrCounter(key, valf)
}
})

b.Run("IncrCounterWithLabels", func(b *testing.B) {
for n := 0; n < b.N; n++ {
for range b.N {
m.IncrCounterWithLabels(key, valf, labels)
}
})

b.Run("AddSample", func(b *testing.B) {
for n := 0; n < b.N; n++ {
for range b.N {
m.AddSample(key, valf)
}
})

b.Run("AddSampleWithLabels", func(b *testing.B) {
for n := 0; n < b.N; n++ {
for range b.N {
m.AddSampleWithLabels(key, valf, labels)
}
})

b.Run("MeasureSince", func(b *testing.B) {
for n := 0; n < b.N; n++ {
for range b.N {
m.MeasureSince(key, valt)
}
})

b.Run("MeasureSinceWithLabels", func(b *testing.B) {
for n := 0; n < b.N; n++ {
for range b.N {
m.MeasureSinceWithLabels(key, valt, labels)
}
})
Expand Down

0 comments on commit 19fe2ee

Please sign in to comment.