Skip to content

Commit

Permalink
add MaxConcurrentStreams to benchmark_test when start the server (#1271)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouyihaiDing authored and menghanl committed May 31, 2017
1 parent bb37286 commit 6bb7648
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmark/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
func runUnary(b *testing.B, maxConcurrentCalls int) {
s := stats.AddStats(b, 38)
b.StopTimer()
target, stopper := StartServer(ServerInfo{Addr: "localhost:0", Type: "protobuf"})
target, stopper := StartServer(ServerInfo{Addr: "localhost:0", Type: "protobuf"}, grpc.MaxConcurrentStreams(uint32(maxConcurrentCalls+1)))
defer stopper()
conn := NewClientConn(target, grpc.WithInsecure())
tc := testpb.NewBenchmarkServiceClient(conn)
Expand Down Expand Up @@ -59,7 +59,7 @@ func runUnary(b *testing.B, maxConcurrentCalls int) {
func runStream(b *testing.B, maxConcurrentCalls int) {
s := stats.AddStats(b, 38)
b.StopTimer()
target, stopper := StartServer(ServerInfo{Addr: "localhost:0", Type: "protobuf"})
target, stopper := StartServer(ServerInfo{Addr: "localhost:0", Type: "protobuf"}, grpc.MaxConcurrentStreams(uint32(maxConcurrentCalls+1)))
defer stopper()
conn := NewClientConn(target, grpc.WithInsecure())
tc := testpb.NewBenchmarkServiceClient(conn)
Expand Down

0 comments on commit 6bb7648

Please sign in to comment.