Index: src/pkg/testing/benchmark.go |
=================================================================== |
--- a/src/pkg/testing/benchmark.go |
+++ b/src/pkg/testing/benchmark.go |
@@ -34,6 +34,7 @@ |
// timing and to specify the number of iterations to run. |
type B struct { |
common |
+ logger |
N int |
benchmark InternalBenchmark |
bytes int64 |
@@ -293,9 +294,13 @@ |
common: common{ |
signal: make(chan interface{}), |
}, |
+ logger: logger{ |
+ frames: 3, // decorate + log + public function. |
+ }, |
benchmark: Benchmark, |
} |
benchName := Benchmark.Name |
+ b.logger.common = &b.common |
if procs != 1 { |
benchName = fmt.Sprintf("%s-%d", Benchmark.Name, procs) |
} |