]> Cypherpunks repositories - gostls13.git/commit
testing: implement -benchtime=100x
authorRuss Cox <rsc@golang.org>
Wed, 3 Oct 2018 00:45:45 +0000 (20:45 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 12 Oct 2018 17:48:31 +0000 (17:48 +0000)
commit8e0aea162b5ed27b444a2a54aa16152022483141
treefc962d594367a2abbafb1e43d10e71804cd4cc4a
parent56131cbd1d61ec446e10dfe72a96f329ed3d952a
testing: implement -benchtime=100x

When running benchmarks with profilers and trying to
compare one run against another, it is very useful to be
able to force each run to execute exactly the same number
of iterations.

Discussion on the proposal issue #24735 led to the decision
to overload -benchtime, so that instead of saying
-benchtime 10s to run a benchmark for 10 seconds,
you say -benchtime 100x to run a benchmark 100 times.

Fixes #24735.

Change-Id: Id17c5bd18bd09987bb48ed12420d61ae9e200fd7
Reviewed-on: https://go-review.googlesource.com/c/139258
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/internal/test/test.go
src/testing/benchmark.go
src/testing/sub_test.go