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

Function DoStreamingRoundTrip

benchmark/benchmark.go:294–302  ·  view source on GitHub ↗

DoStreamingRoundTrip performs a round trip for a single streaming rpc.

(stream testgrpc.BenchmarkService_StreamingCallClient, reqSize, respSize int)

Source from the content-addressed store, hash-verified

292
293// DoStreamingRoundTrip performs a round trip for a single streaming rpc.
294func DoStreamingRoundTrip(stream testgrpc.BenchmarkService_StreamingCallClient, reqSize, respSize int) error {
295 pl := NewPayload(testpb.PayloadType_COMPRESSABLE, reqSize)
296 req := &testpb.SimpleRequest{
297 ResponseType: pl.Type,
298 ResponseSize: int32(respSize),
299 Payload: pl,
300 }
301 return DoStreamingRoundTripPreloaded(stream, req)
302}
303
304// DoStreamingRoundTripPreloaded performs a round trip for a single streaming rpc with preloaded payload.
305func DoStreamingRoundTripPreloaded(stream testgrpc.BenchmarkService_StreamingCallClient, req any) error {

Callers

nothing calls this directly

Calls 2

NewPayloadFunction · 0.85

Tested by

no test coverage detected