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

Function makeFuncUnconstrainedStream

benchmark/benchmain/main.go:478–486  ·  view source on GitHub ↗
(bf stats.Features)

Source from the content-addressed store, hash-verified

476}
477
478func makeFuncUnconstrainedStream(bf stats.Features) (rpcSendFunc, rpcRecvFunc, rpcCleanupFunc) {
479 streams, req, cleanup := setupStream(bf, true)
480
481 return func(cn, pos int) {
482 streams[cn][pos].Send(req)
483 }, func(cn, pos int) {
484 streams[cn][pos].Recv()
485 }, cleanup
486}
487
488func setupStream(bf stats.Features, unconstrained bool) ([][]testgrpc.BenchmarkService_StreamingCallClient, *testpb.SimpleRequest, rpcCleanupFunc) {
489 clients, cleanup := makeClients(bf)

Callers 1

Calls 3

setupStreamFunction · 0.85
SendMethod · 0.65
RecvMethod · 0.65

Tested by

no test coverage detected