Skip to content

Commit

Permalink
chore(bench): withMethodExpr => withMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav committed Sep 10, 2023
1 parent 1d9848c commit f5b6618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logger_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func Benchmark5WithLazysNotUsed(b *testing.B) {
benchmarkWithUsed(b, (*Logger).WithLazy, 5, false)
}

func benchmarkWithUsed(b *testing.B, withMethodExpr func(*Logger, ...zapcore.Field) *Logger, N int, use bool) {
func benchmarkWithUsed(b *testing.B, withMethod func(*Logger, ...zapcore.Field) *Logger, N int, use bool) {
keys := make([]string, N)
values := make([]string, N)
for i := 0; i < N; i++ {
Expand All @@ -232,7 +232,7 @@ func benchmarkWithUsed(b *testing.B, withMethodExpr func(*Logger, ...zapcore.Fie

withBenchedLogger(b, func(log *Logger) {
for i := 0; i < N; i++ {
log = withMethodExpr(log, String(keys[i], values[i]))
log = withMethod(log, String(keys[i], values[i]))
}
if use {
log.Info("used")
Expand Down

0 comments on commit f5b6618

Please sign in to comment.