mirror of https://github.com/golang/go.git
net/rpc: don't assume b.N > 0
Change-Id: I58c4a75168fd1f797a25735c4151f501f0475332 Reviewed-on: https://go-review.googlesource.com/20854 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
6e2deaa1e1
commit
d3ce412fa5
|
|
@ -657,6 +657,9 @@ func benchmarkEndToEnd(dial func() (*Client, error), b *testing.B) {
|
|||
}
|
||||
|
||||
func benchmarkEndToEndAsync(dial func() (*Client, error), b *testing.B) {
|
||||
if b.N == 0 {
|
||||
return
|
||||
}
|
||||
const MaxConcurrentCalls = 100
|
||||
once.Do(startServer)
|
||||
client, err := dial()
|
||||
|
|
|
|||
Loading…
Reference in New Issue