diff options
author | montag451 <montag451@laposte.net> | 2023-08-04 22:04:10 +0000 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-08-07 18:49:02 +0000 |
commit | 64c1be144fdf804c5cfc6cb06eb68cc9496eedba (patch) | |
tree | 8a34e8fa315f009b9eb0587df04dd61393ccea25 /src/testing | |
parent | 9869699c44bb9d1d5f94c1ee32092451a418b95c (diff) | |
download | go-64c1be144fdf804c5cfc6cb06eb68cc9496eedba.tar.gz go-64c1be144fdf804c5cfc6cb06eb68cc9496eedba.zip |
testing: improve the usage message of -benchtime
Specify that -benchtime can take the form Nx.
Change-Id: I1e711cdb2e19e3ff5eb2cea4e7c8843bc58696b1
GitHub-Last-Rev: 1cb13f7dba829497c5cbb3d4c578f4984e1cbd28
GitHub-Pull-Request: golang/go#61756
Reviewed-on: https://go-review.googlesource.com/c/go/+/515801
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/benchmark.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing/benchmark.go b/src/testing/benchmark.go index 0f4fc3d930..0faf075d93 100644 --- a/src/testing/benchmark.go +++ b/src/testing/benchmark.go @@ -25,7 +25,7 @@ import ( func initBenchmarkFlags() { matchBenchmarks = flag.String("test.bench", "", "run only benchmarks matching `regexp`") benchmarkMemory = flag.Bool("test.benchmem", false, "print memory allocations for benchmarks") - flag.Var(&benchTime, "test.benchtime", "run each benchmark for duration `d`") + flag.Var(&benchTime, "test.benchtime", "run each benchmark for duration `d` or N times if `d` is of the form Nx") } var ( |