Commit d3ce412f authored by Marcel van Lohuizen's avatar Marcel van Lohuizen Committed by Russ Cox

net/rpc: don't assume b.N > 0

Change-Id: I58c4a75168fd1f797a25735c4151f501f0475332
Reviewed-on: https://go-review.googlesource.com/20854Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 6e2deaa1
...@@ -657,6 +657,9 @@ func benchmarkEndToEnd(dial func() (*Client, error), b *testing.B) { ...@@ -657,6 +657,9 @@ func benchmarkEndToEnd(dial func() (*Client, error), b *testing.B) {
} }
func benchmarkEndToEndAsync(dial func() (*Client, error), b *testing.B) { func benchmarkEndToEndAsync(dial func() (*Client, error), b *testing.B) {
if b.N == 0 {
return
}
const MaxConcurrentCalls = 100 const MaxConcurrentCalls = 100
once.Do(startServer) once.Do(startServer)
client, err := dial() client, err := dial()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment