Skip to content

Commit 457c2f5

Browse files
authoredNov 10, 2022
benchmark: use default buffer sizes (grpc#5762)
1 parent 689d061 commit 457c2f5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed
 

‎benchmark/benchmark.go

-4
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,6 @@ type ServerInfo struct {
198198
// StartServer starts a gRPC server serving a benchmark service according to info.
199199
// It returns a function to stop the server.
200200
func StartServer(info ServerInfo, opts ...grpc.ServerOption) func() {
201-
opts = append(opts, grpc.WriteBufferSize(128*1024))
202-
opts = append(opts, grpc.ReadBufferSize(128*1024))
203201
s := grpc.NewServer(opts...)
204202
switch info.Type {
205203
case "protobuf":
@@ -278,8 +276,6 @@ func NewClientConn(addr string, opts ...grpc.DialOption) *grpc.ClientConn {
278276

279277
// NewClientConnWithContext creates a gRPC client connection to addr using ctx.
280278
func NewClientConnWithContext(ctx context.Context, addr string, opts ...grpc.DialOption) *grpc.ClientConn {
281-
opts = append(opts, grpc.WithWriteBufferSize(128*1024))
282-
opts = append(opts, grpc.WithReadBufferSize(128*1024))
283279
conn, err := grpc.DialContext(ctx, addr, opts...)
284280
if err != nil {
285281
logger.Fatalf("NewClientConn(%q) failed to create a ClientConn %v", addr, err)

0 commit comments

Comments
 (0)
Please sign in to comment.