Applying the following patch illustrates the problem:
diff --git a/src/go/format/benchmark_test.go b/src/go/format/benchmark_test.go
index 7bd45c0e95..62131e0977 100644
--- a/src/go/format/benchmark_test.go
+++ b/src/go/format/benchmark_test.go
@@ -58,6 +58,7 @@ var tests = []struct {
}
func BenchmarkFormat(b *testing.B) {
+ b.Logf("foo") // <<< not reported
var src bytes.Buffer
for _, t := range tests {
src.Reset()
@@ -74,6 +75,7 @@ func BenchmarkFormat(b *testing.B) {
}
b.Run(fmt.Sprintf("%s-%d", t.name, t.n), func(b *testing.B) {
+ b.Logf("foo") // <<< reported
b.SetBytes(int64(len(data)))
b.ReportAllocs()
b.ResetTimer()
When running this benchmark, the outer b.Logf call doesn't get reported in the output.
I expected to see both.
Applying the following patch illustrates the problem:
When running this benchmark, the outer b.Logf call doesn't get reported in the output.
I expected to see both.