event: renaming all benchmarks for consistency
Change-Id: I0dbe99f73005c7b7f70f78326f624cf02a0ba641
Reviewed-on: https://go-review.googlesource.com/c/exp/+/325578
Trust: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/event/adapter/logrus/bench_test.go b/event/adapter/logrus/bench_test.go
index cc2f81a..51eb0ee 100644
--- a/event/adapter/logrus/bench_test.go
+++ b/event/adapter/logrus/bench_test.go
@@ -75,11 +75,11 @@
return context.WithValue(context.Background(), logrusKey{}, logger)
}
-func BenchmarkLogrus(b *testing.B) {
+func BenchmarkLogrusLogDiscard(b *testing.B) {
bench.RunBenchmark(b, logrusPrint(io.Discard), logrusLog)
}
-func BenchmarkLogrusf(b *testing.B) {
+func BenchmarkLogrusLogfDiscard(b *testing.B) {
bench.RunBenchmark(b, logrusPrint(io.Discard), logrusLogf)
}
diff --git a/event/adapter/zap/bench_test.go b/event/adapter/zap/bench_test.go
index 55cf653..bbad9c8 100644
--- a/event/adapter/zap/bench_test.go
+++ b/event/adapter/zap/bench_test.go
@@ -66,15 +66,15 @@
return context.WithValue(context.Background(), zapKey{}, logger)
}
-func BenchmarkLogZap(b *testing.B) {
+func BenchmarkZapLogDiscard(b *testing.B) {
bench.RunBenchmark(b, zapPrint(io.Discard), zapLog)
}
-func BenchmarkLogZapf(b *testing.B) {
+func BenchmarkZapLogfDiscard(b *testing.B) {
bench.RunBenchmark(b, zapPrint(io.Discard), zapLogf)
}
-func TestLogZapf(t *testing.T) {
+func TestZapLogfDiscard(t *testing.T) {
bench.TestBenchmark(t, zapPrint, zapLogf, `
2020/03/05 14:27:48 info a where A=0
2020/03/05 14:27:49 info b where B="A value"
diff --git a/event/adapter/zerolog/bench_test.go b/event/adapter/zerolog/bench_test.go
index d60d95d..822100f 100644
--- a/event/adapter/zerolog/bench_test.go
+++ b/event/adapter/zerolog/bench_test.go
@@ -49,11 +49,11 @@
return logger.WithContext(context.Background())
}
-func BenchmarkLogZerolog(b *testing.B) {
+func BenchmarkZerologLogDiscard(b *testing.B) {
bench.RunBenchmark(b, zerologPrint(io.Discard), zerologMsg)
}
-func BenchmarkLogZerologf(b *testing.B) {
+func BenchmarkZerologLogfDiscard(b *testing.B) {
bench.RunBenchmark(b, zerologPrint(io.Discard), zerologMsgf)
}
diff --git a/event/bench/stdlib_test.go b/event/bench/stdlib_test.go
index a1be39e..1728208 100644
--- a/event/bench/stdlib_test.go
+++ b/event/bench/stdlib_test.go
@@ -94,11 +94,11 @@
)
}
-func BenchmarkLogStdlib(b *testing.B) {
+func BenchmarkStdlibLogfDiscard(b *testing.B) {
bench.RunBenchmark(b, stdlibLogger(ioutil.Discard), stdlibLog)
}
-func BenchmarkLogPrintf(b *testing.B) {
+func BenchmarkStdlibPrintfDiscard(b *testing.B) {
bench.RunBenchmark(b, stdlibWriter(io.Discard), stdlibPrintf)
}
diff --git a/event/bench_test.go b/event/bench_test.go
index ac7f397..648eeed 100644
--- a/event/bench_test.go
+++ b/event/bench_test.go
@@ -97,34 +97,34 @@
return event.WithExporter(context.Background(), event.NewExporter(logfmt.NewHandler(w), eventtest.ExporterOptions()))
}
-func BenchmarkLogEventNoExporter(b *testing.B) {
+func BenchmarkEventLogNoExporter(b *testing.B) {
bench.RunBenchmark(b, eventNoExporter(), eventLog)
}
-func BenchmarkLogEventNoop(b *testing.B) {
+func BenchmarkEventLogNoop(b *testing.B) {
bench.RunBenchmark(b, eventNoop(), eventLog)
}
-func BenchmarkLogEventDiscard(b *testing.B) {
+func BenchmarkEventLogDiscard(b *testing.B) {
bench.RunBenchmark(b, eventPrint(io.Discard), eventLog)
}
-func BenchmarkLogEventfDiscard(b *testing.B) {
+func BenchmarkEventLogfDiscard(b *testing.B) {
bench.RunBenchmark(b, eventPrint(io.Discard), eventLogf)
}
-func BenchmarkTraceEventNoop(b *testing.B) {
+func BenchmarkEventTraceNoop(b *testing.B) {
bench.RunBenchmark(b, eventNoop(), eventTrace)
}
-func BenchmarkTraceEventDiscard(b *testing.B) {
+func BenchmarkEventTraceDiscard(b *testing.B) {
bench.RunBenchmark(b, eventPrint(io.Discard), eventTrace)
}
-func BenchmarkMetricEventNoop(b *testing.B) {
+func BenchmarkEventMetricNoop(b *testing.B) {
bench.RunBenchmark(b, eventNoop(), eventMetric)
}
-func BenchmarkMetricEventDiscard(b *testing.B) {
+func BenchmarkEventMetricDiscard(b *testing.B) {
bench.RunBenchmark(b, eventPrint(io.Discard), eventMetric)
}