Skip to content

Commit

Permalink
benchmark: use default buffer sizes (#5762)
Browse files Browse the repository at this point in the history
  • Loading branch information
atollena committed Nov 10, 2022
1 parent 689d061 commit 457c2f5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions benchmark/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,6 @@ type ServerInfo struct {
// StartServer starts a gRPC server serving a benchmark service according to info.
// It returns a function to stop the server.
func StartServer(info ServerInfo, opts ...grpc.ServerOption) func() {
opts = append(opts, grpc.WriteBufferSize(128*1024))
opts = append(opts, grpc.ReadBufferSize(128*1024))
s := grpc.NewServer(opts...)
switch info.Type {
case "protobuf":
Expand Down Expand Up @@ -278,8 +276,6 @@ func NewClientConn(addr string, opts ...grpc.DialOption) *grpc.ClientConn {

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

0 comments on commit 457c2f5

Please sign in to comment.