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

Function NewPayload

benchmark/benchmark.go:62–66  ·  view source on GitHub ↗

NewPayload creates a payload with the given type and size.

(t testpb.PayloadType, size int)

Source from the content-addressed store, hash-verified

60
61// NewPayload creates a payload with the given type and size.
62func NewPayload(t testpb.PayloadType, size int) *testpb.Payload {
63 p := new(testpb.Payload)
64 setPayload(p, t, size)
65 return p
66}
67
68type testServer struct {
69 testgrpc.UnimplementedBenchmarkServiceServer

Callers 5

makeFuncStreamFunction · 0.92
setupStreamFunction · 0.92
UnaryCallMethod · 0.85
DoUnaryCallFunction · 0.85
DoStreamingRoundTripFunction · 0.85

Calls 1

setPayloadFunction · 0.85

Tested by

no test coverage detected