]> Cypherpunks.ru repositories - gostls13.git/commit
testing: probe with N=1
authorMarcel van Lohuizen <mpvl@golang.org>
Wed, 23 Mar 2016 20:24:22 +0000 (21:24 +0100)
committerMarcel van Lohuizen <mpvl@golang.org>
Fri, 25 Mar 2016 09:29:36 +0000 (09:29 +0000)
commit31e5d83525acbba07b38106952834c9a44b855a7
tree36efa20f43b98b0c1c97366d22b8ba61abcf90c6
parent2e79d7fbee7d635f93940c482cd366ad4ae551a1
testing: probe with N=1

Change control flow to probe with N=1. This calls benchFunc
the same number of times as the old implementation in the
absence of subbenchmarks.

To be compatible with existing tools, benchmarking only
prints a line for "leaf" benchmarks. This means, though, that
the name of a benchmark can only be printed after the first
iteration.

Issue #14863

Change-Id: Ic7b9b89b058f8ebb5287755f24f9e47df8c9537c
Reviewed-on: https://go-review.googlesource.com/21043
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/testing/benchmark.go
src/testing/sub_test.go