Skip to content

Commit

Permalink
optimize benchmark transport config
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar committed Jun 2, 2017
1 parent 6130e6e commit 6687047
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/benchmark/cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ var (
func makeHttpClients(totalClients uint) []*http.Client {
clients := make([]*http.Client, totalClients)
for i := range clients {
clients[i] = &http.Client{Transport: &http.Transport{}, Timeout: defaultTimeout}
transport := &http.Transport{}
transport.MaxIdleConnsPerHost = 10000
clients[i] = &http.Client{Transport: transport, Timeout: defaultTimeout}
}
return clients
}
Expand Down

0 comments on commit 6687047

Please sign in to comment.