Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Unified Diff: src/pkg/testing/benchmark.go

Issue 12405043: code review 12405043: testing: add Frames method to adjust the logging of the... (Closed)
Patch Set: diff -r bf1cd157b3e0 https://code.google.com/p/go Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pkg/testing/testing.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
}
« no previous file with comments | « no previous file | src/pkg/testing/testing.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b