mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
05e4e805e0
commit
f8b5838123
9 changed files with 14 additions and 14 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue