-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
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.
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.