Go to the documentation of this file.
19 #ifndef TEST_CPP_MICROBENCHMARKS_CALLBACK_STREAMING_PING_PONG_H
20 #define TEST_CPP_MICROBENCHMARKS_CALLBACK_STREAMING_PING_PONG_H
24 #include <benchmark/benchmark.h>
27 #include "src/proto/grpc/testing/echo.grpc.pb.h"
62 void OnWriteDone(
bool ok)
override {
71 void OnDone(
const Status& s)
override {
74 if (
state_->KeepRunning()) {
78 std::unique_lock<std::mutex> l(
mu);
94 std::unique_lock<std::mutex> l(
mu);
110 EchoTestService::Stub*
stub_;
118 std::condition_variable
cv;
122 template <
class Fixture,
class ClientContextMutator,
class ServerContextMutator>
124 int message_size =
state.range(0);
125 int max_ping_pongs =
state.range(1);
128 std::unique_ptr<EchoTestService::Stub>
stub_(
129 EchoTestService::NewStub(
fixture->channel()));
133 if (message_size > 0) {
138 if (
state.KeepRunning()) {
145 state.SetBytesProcessed(2 * message_size * max_ping_pongs *
151 #endif // TEST_CPP_MICROBENCHMARKS_CALLBACK_STREAMING_PING_PONG_H
std::unique_ptr< grpc::testing::EchoTestService::Stub > stub_
grpc_http_response response_
#define GPR_TIMER_SCOPE(tag, important)
ClientBidiReactor is the interface for a bidirectional streaming RPC.
void StartWrite(const EchoRequest *req)
void OnReadDone(bool ok) override
static const char fixture[]
BidiClient(benchmark::State *state, EchoTestService::Stub *stub, ClientContext *cli_ctx, EchoRequest *request, EchoResponse *response)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
const char *const kServerMessageSize
grpc_connectivity_state state_
static void BM_CallbackBidiStreaming(benchmark::State &state)
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
static bool to_string(zval *from)
static struct rpc_state state
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:51