Go to the documentation of this file.
25 #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h"
34 :
public BenchmarkService::CallbackService {
39 auto* reactor =
context->DefaultReactor();
49 grpc::testing::SimpleResponse> {
53 void OnReadDone(
bool ok)
override {
66 void OnWriteDone(
bool ok)
override {
74 void OnDone()
override {
delete (
this); }
86 if (
request->response_size() > 0) {
102 auto port_num =
port();
116 if (
impl_ ==
nullptr) {
130 std::unique_ptr<grpc::Server>
impl_;
134 const ServerConfig&
config) {
grpc_http_response response_
ServerBidiReactor is the interface for a bidirectional streaming RPC.
std::string server_address("0.0.0.0:10000")
std::shared_ptr< Channel > InProcessChannel(const ChannelArguments &args) override
CallbackServer(const ServerConfig &config)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
std::string JoinHostPort(absl::string_view host, int port)
static void ApplyConfigToBuilder(const ServerConfig &config, ServerBuilder *builder)
std::unique_ptr< Server > CreateCallbackServer(const ServerConfig &config)
static const Status & OK
An OK pre-defined instance.
static Status SetResponse(const SimpleRequest *request, SimpleResponse *response)
static std::shared_ptr< ServerCredentials > CreateServerCredentials(const ServerConfig &config)
static bool SetPayload(PayloadType type, int size, Payload *payload)
BenchmarkCallbackServiceImpl service_
std::unique_ptr< ServerBuilder > CreateQpsServerBuilder()
double Finish(Counter const &c, IterationCount iterations, double cpu_time, double num_threads)
std::unique_ptr< grpc::Server > impl_
GRPC_CUSTOM_UTIL_STATUS Status
grpc::ServerBidiReactor< grpc::testing::SimpleRequest, grpc::testing::SimpleResponse > * StreamingCall(grpc::CallbackServerContext *) override
grpc::ClientContext context
grpc::ServerUnaryReactor * UnaryCall(grpc::CallbackServerContext *context, const SimpleRequest *request, SimpleResponse *response) override
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:11