Go to the documentation of this file.
19 #ifndef TEST_CPP_MICROBENCHMARKS_FULLSTACK_FIXTURES_H
20 #define TEST_CPP_MICROBENCHMARKS_FULLSTACK_FIXTURES_H
59 b->SetMaxReceiveMessageSize(INT_MAX);
60 b->SetMaxSendMessageSize(INT_MAX);
71 if (address.length() > 0) {
74 cq_ =
b.AddCompletionQueue(
true);
76 config.ApplyCommonServerBuilderConfig(&
b);
80 if (address.length() > 0) {
109 std::unique_ptr<ServerCompletionQueue>
cq_;
127 std::stringstream
addr;
148 std::stringstream
addr;
149 addr <<
"unix:/tmp/bm_fullstack." << *
port;
169 cq_ =
b.AddCompletionQueue(
true);
181 server_args, endpoints.
server,
false );
215 std::vector<std::unique_ptr<
231 out <<
" polls/iter:"
246 std::unique_ptr<ServerCompletionQueue>
cq_;
257 fixture_configuration) {}
270 fixture_configuration),
281 out <<
" writes/iter:"
283 static_cast<double>(
state.iterations());
303 fixture_configuration) {}
321 template <
class Base>
static std::string MakeAddress(int *port)
grpc_error_handle SetupTransport(grpc_transport *transport, grpc_pollset *accepting_pollset, const grpc_channel_args *args, const RefCountedPtr< channelz::SocketNode > &socket_node)
std::shared_ptr< Channel > CreateChannelInternal(const std::string &host, grpc_channel *c_channel, std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
#define gpr_atm_no_barrier_load(p)
virtual void ApplyCommonServerBuilderConfig(ServerBuilder *b) const
std::shared_ptr< Channel > channel_
UDS(Service *service, const FixtureConfiguration &fixture_configuration=FixtureConfiguration())
grpc_transport * grpc_create_chttp2_transport(const grpc_channel_args *channel_args, grpc_endpoint *ep, bool is_client)
const grpc_channel_args * channel_args() const
#define GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH
MinStackize< InProcessCHTTP2 > MinInProcessCHTTP2
MinStackize< InProcess > MinInProcess
@ GRPC_CLIENT_DIRECT_CHANNEL
virtual void ApplyCommonChannelArguments(ChannelArguments *c) const
InProcessCHTTP2(Service *service, const FixtureConfiguration &fixture_configuration=FixtureConfiguration())
InProcess(Service *service, const FixtureConfiguration &fixture_configuration=FixtureConfiguration())
void grpc_recycle_unused_port(int port)
static ChannelArgs FromC(const grpc_channel_args *args)
#define GRPC_LOG_IF_ERROR(what, error)
grpc_passthru_endpoint_stats * grpc_passthru_endpoint_stats_create()
#define GRPC_ARG_MAX_SEND_MESSAGE_LENGTH
void ApplyCommonChannelArguments(ChannelArguments *a) const override
std::unique_ptr< Server > server_
grpc_transport * server_transport_
Desriptor of an RPC service and its various RPC methods.
TCP(Service *service, const FixtureConfiguration &fixture_configuration=FixtureConfiguration())
#define GRPC_ARG_DEFAULT_AUTHORITY
void grpc_passthru_endpoint_create(grpc_endpoint **client, grpc_endpoint **server, grpc_passthru_endpoint_stats *stats, bool simulate_channel_actions)
const std::vector< grpc_pollset * > & pollsets() const
~FullstackFixture() override
~InProcessCHTTP2WithExplicitStats() override
MinStackize(Service *service)
A builder class for the creation and startup of grpc::Server instances.
gpr_timespec grpc_timeout_milliseconds_to_deadline(int64_t time_ms)
MinStackize< SockPair > MinSockPair
static std::string MakeAddress(int *port)
std::unique_ptr< ServerCompletionQueue > cq_
grpc_passthru_endpoint_stats * stats_
int grpc_pick_unused_port_or_die(void)
std::unique_ptr< Server > server_
SockPair(Service *service, const FixtureConfiguration &fixture_configuration=FixtureConfiguration())
static void * tag(intptr_t t)
std::shared_ptr< Channel > channel()
grpc_transport * client_transport_
InProcessCHTTP2WithExplicitStats(Service *service, grpc_passthru_endpoint_stats *stats, const FixtureConfiguration &fixture_configuration)
std::shared_ptr< Channel > channel()
void AddToLabel(std::ostream &out, benchmark::State &state) override
void AddToLabel(std::ostream &out, benchmark::State &state) override
grpc_core::ExecCtx exec_ctx
std::unique_ptr< ServerCompletionQueue > cq_
ServerCompletionQueue * cq()
grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, grpc_channel_args *args)
#define GRPC_ARG_MINIMAL_STACK
std::shared_ptr< Channel > CreateCustomChannel(const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const ChannelArguments &args)
BENCHMARK_ALWAYS_INLINE IterationCount iterations() const
MinStackize< TCP > MinTCP
virtual ~FixtureConfiguration()
struct grpc_channel grpc_channel
std::shared_ptr< Channel > channel_
~EndpointPairFixture() override
std::shared_ptr< ServerCredentials > InsecureServerCredentials()
void AddToLabel(std::ostream &out, benchmark::State &state) override
FullstackFixture(Service *service, const FixtureConfiguration &config, const std::string &address)
static grpc_endpoint_pair MakeEndpoints(grpc_passthru_endpoint_stats *stats)
std::shared_ptr< ChannelCredentials > InsecureChannelCredentials()
Credentials for an unencrypted, unauthenticated channel.
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
void grpc_endpoint_add_to_pollset(grpc_endpoint *ep, grpc_pollset *pollset)
static Server * FromC(grpc_server *c_type)
ServerCompletionQueue * cq()
void ApplyCommonServerBuilderConfig(ServerBuilder *b) const override
virtual void AddToLabel(std::ostream &out, benchmark::State &state)
void grpc_passthru_endpoint_stats_destroy(grpc_passthru_endpoint_stats *stats)
int grpc_get_cq_poll_num(grpc_completion_queue *cq)
MinStackize< UDS > MinUDS
static absl::StatusOr< RefCountedPtr< Channel > > Create(const char *target, ChannelArgs args, grpc_channel_stack_type channel_stack_type, grpc_transport *optional_transport)
EndpointPairFixture(Service *service, grpc_endpoint_pair endpoints, const FixtureConfiguration &fixture_configuration)
void grpc_chttp2_transport_start_reading(grpc_transport *transport, grpc_slice_buffer *read_buffer, grpc_closure *notify_on_receive_settings, grpc_closure *notify_on_close)
grpc_endpoint_pair endpoint_pair_
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:22