Skip to content

Commit

Permalink
Rename run to benchFn based on review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Jan 3, 2024
1 parent e974df7 commit 7c84fa5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions attribute/set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func BenchmarkFiltering(b *testing.B) {
dropped []attribute.KeyValue
}

run := func(fltr attribute.Filter) func(*testing.B) {
benchFn := func(fltr attribute.Filter) func(*testing.B) {
return func(b *testing.B) {
b.Helper()
b.Run("Set.Filter", func(b *testing.B) {
Expand All @@ -362,8 +362,8 @@ func BenchmarkFiltering(b *testing.B) {
}
}

b.Run("NoFilter", run(nil))
b.Run("NoFiltered", run(func(attribute.KeyValue) bool { return true }))
b.Run("Filtered", run(func(kv attribute.KeyValue) bool { return kv.Key == "A" }))
b.Run("AllDropped", run(func(attribute.KeyValue) bool { return false }))
b.Run("NoFilter", benchFn(nil))
b.Run("NoFiltered", benchFn(func(attribute.KeyValue) bool { return true }))
b.Run("Filtered", benchFn(func(kv attribute.KeyValue) bool { return kv.Key == "A" }))
b.Run("AllDropped", benchFn(func(attribute.KeyValue) bool { return false }))
}

0 comments on commit 7c84fa5

Please sign in to comment.