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

Function unaryCaller

benchmark/benchmain/main.go:539–543  ·  view source on GitHub ↗

Makes a UnaryCall gRPC request using the given BenchmarkServiceClient and request and response sizes.

(client testgrpc.BenchmarkServiceClient, reqSize, respSize int)

Source from the content-addressed store, hash-verified

537// Makes a UnaryCall gRPC request using the given BenchmarkServiceClient and
538// request and response sizes.
539func unaryCaller(client testgrpc.BenchmarkServiceClient, reqSize, respSize int) {
540 if err := benchmark.DoUnaryCall(client, reqSize, respSize); err != nil {
541 logger.Fatalf("DoUnaryCall failed: %v", err)
542 }
543}
544
545func streamCaller(stream testgrpc.BenchmarkService_StreamingCallClient, req any) {
546 if err := benchmark.DoStreamingRoundTripPreloaded(stream, req); err != nil {

Callers 1

makeFuncUnaryFunction · 0.85

Calls 2

DoUnaryCallFunction · 0.92
FatalfMethod · 0.65

Tested by

no test coverage detected