testing: change -test.benchtime to a flag.Duration.

Fixes #3902.

R=golang-dev, minux.ma, rsc, r
CC=golang-dev
https://golang.org/cl/6611059
This commit is contained in:
David Symonds 2012-10-09 08:57:29 +11:00
parent 05e4e805e0
commit f8b5838123
9 changed files with 14 additions and 14 deletions

View file

@ -38,9 +38,9 @@ func BenchmarkSlowNonASCII(b *testing.B) {
}
func main() {
os.Args = []string{os.Args[0], "-test.benchtime=0.1"}
os.Args = []string{os.Args[0], "-test.benchtime=100ms"}
flag.Parse()
rslow := testing.Benchmark(BenchmarkSlowNonASCII)
rfast := testing.Benchmark(BenchmarkFastNonASCII)
tslow := rslow.NsPerOp()