]> Cypherpunks.ru repositories - gostls13.git/commit
testing: fix Benchmark() to start at 1 iteration, not 100
authorHeschi Kreinick <heschi@google.com>
Mon, 27 Feb 2017 23:26:33 +0000 (18:26 -0500)
committerMarcel van Lohuizen <mpvl@golang.org>
Wed, 1 Mar 2017 11:06:34 +0000 (11:06 +0000)
commit5e90bbcc6de54ecbad1d72bc8e71e167829069b5
tree0cc6845db91706caba386bac832c7669fd1e72c2
parent29f061960d5008170541a886feab721bf754f0fd
testing: fix Benchmark() to start at 1 iteration, not 100

The run1 call removed in golang.org/cl/36990 was necessary to
initialize the duration of the benchmark. With it gone, the math in
launch() starts from 100. This doesn't work out well for second-long
benchmark methods. Put it back.

Updates #18815

Change-Id: I461f3466c805d0c61124a2974662f7ad45335794
Reviewed-on: https://go-review.googlesource.com/37530
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
src/testing/benchmark.go
src/testing/sub_test.go