MCPcopy
hub / github.com/grpc/grpc-go / buildConnections

Function buildConnections

benchmark/client/main.go:136–147  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

134}
135
136func buildConnections(ctx context.Context) []*grpc.ClientConn {
137 ccs := make([]*grpc.ClientConn, *numConn)
138 for i := range ccs {
139 ccs[i] = benchmark.NewClientConnWithContext(ctx, "localhost:"+*port,
140 grpc.WithTransportCredentials(insecure.NewCredentials()),
141 grpc.WithBlock(),
142 grpc.WithWriteBufferSize(128*1024),
143 grpc.WithReadBufferSize(128*1024),
144 )
145 }
146 return ccs
147}
148
149func runWithConn(cc *grpc.ClientConn, req *testpb.SimpleRequest, warmDeadline, endDeadline time.Time) {
150 for i := 0; i < *numRPC; i++ {

Callers 1

mainFunction · 0.85

Calls 6

NewClientConnWithContextFunction · 0.92
WithTransportCredentialsFunction · 0.92
NewCredentialsFunction · 0.92
WithBlockFunction · 0.92
WithWriteBufferSizeFunction · 0.92
WithReadBufferSizeFunction · 0.92

Tested by

no test coverage detected