testing: improve the usage message of -benchtime

Specify that -benchtime can take the form Nx.
This commit is contained in:
montag451 2023-08-04 14:41:06 +02:00
parent 74caf475e3
commit 1cb13f7dba
No known key found for this signature in database
GPG key ID: F76F2FAD17133DE0

View file

@ -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 (