Skip to content

Commit 53d1f23

Browse files
authored
benchmark: update proper benchmark binary to use larger buffers (#6537)
1 parent fbff2ab commit 53d1f23

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

benchmark/worker/benchmark_client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ func setupClientEnv(config *testpb.ClientConfig) {
116116
// It returns the connections and corresponding function to close them.
117117
// It returns non-nil error if there is anything wrong.
118118
func createConns(config *testpb.ClientConfig) ([]*grpc.ClientConn, func(), error) {
119-
var opts []grpc.DialOption
119+
opts := []grpc.DialOption{
120+
grpc.WithWriteBufferSize(128 * 1024),
121+
grpc.WithReadBufferSize(128 * 1024),
122+
}
120123

121124
// Sanity check for client type.
122125
switch config.ClientType {

benchmark/worker/benchmark_server.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ func startBenchmarkServer(config *testpb.ServerConfig, serverPort int) (*benchma
8080
}
8181
runtime.GOMAXPROCS(numOfCores)
8282

83-
var opts []grpc.ServerOption
83+
opts := []grpc.ServerOption{
84+
grpc.WriteBufferSize(128 * 1024),
85+
grpc.ReadBufferSize(128 * 1024),
86+
}
8487

8588
// Sanity check for server type.
8689
switch config.ServerType {

0 commit comments

Comments
 (0)