From: montag451 Date: Fri, 4 Aug 2023 22:04:10 +0000 (+0000) Subject: testing: improve the usage message of -benchtime X-Git-Tag: go1.22rc1~1381 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=64c1be144fdf804c5cfc6cb06eb68cc9496eedba;p=gostls13.git 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 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: Michael Knyszek --- 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 (