Classes | Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
grpc::testing::AsyncClient< StubType, RequestType > Class Template Reference
Inheritance diagram for grpc::testing::AsyncClient< StubType, RequestType >:
Inheritance graph
[legend]

Classes

struct  PerThreadShutdownState
 

Public Member Functions

 AsyncClient (const ClientConfig &config, std::function< ClientRpcContext *(StubType *, std::function< gpr_timespec()> next_issue, const RequestType &)> setup_ctx, std::function< std::unique_ptr< StubType >(std::shared_ptr< Channel >)> create_stub)
 
int GetPollCount () override
 
std::function< gpr_timespec()> NextIssuer (int thread_idx)
 
void SetupLoadTest (const ClientConfig &config, size_t num_threads)
 
 ~AsyncClient () override
 
- Public Member Functions inherited from grpc::testing::ClientImpl< StubType, RequestType >
 ClientImpl (const ClientConfig &config, std::function< std::unique_ptr< StubType >(std::shared_ptr< Channel >)> create_stub)
 
const RequestType * request ()
 
void WaitForChannelsToConnect ()
 
 ~ClientImpl () override
 
- Public Member Functions inherited from grpc::testing::Client
void AwaitThreadsCompletion ()
 
 Client ()
 
double GetLatencyCollectionIntervalInSeconds ()
 
bool IsClosedLoop ()
 
ClientStats Mark (bool reset)
 
gpr_timespec NextIssueTime (int thread_idx)
 
bool ThreadCompleted ()
 
virtual ~Client ()
 

Public Attributes

bool closed_loop_
 

Protected Attributes

const int num_async_threads_
 
- Protected Attributes inherited from grpc::testing::ClientImpl< StubType, RequestType >
std::vector< ClientChannelInfochannels_
 
const int cores_
 
std::function< std::unique_ptr< StubType >const std::shared_ptr< Channel > &)> create_stub_
 
RequestType request_
 
- Protected Attributes inherited from grpc::testing::Client
bool closed_loop_
 
InterarrivalTimer interarrival_timer_
 
int last_reset_poll_count_
 
double median_latency_collection_interval_seconds_
 
std::vector< gpr_timespecnext_time_
 
gpr_event start_requests_
 
bool started_requests_
 
std::mutex thread_completion_mu_
 
gpr_atm thread_pool_done_
 
std::vector< std::unique_ptr< Thread > > threads_
 
std::condition_variable threads_complete_
 
size_t threads_remaining_
 
std::unique_ptr< UsageTimertimer_
 

Private Member Functions

void DestroyMultithreading () final
 
int NumThreads (const ClientConfig &config)
 
ClientRpcContextProcessTag (size_t thread_idx, void *tag)
 
void ThreadFunc (size_t thread_idx, Client::Thread *t) final
 

Private Attributes

std::vector< std::unique_ptr< CompletionQueue > > cli_cqs_
 
std::vector< intcq_
 
std::vector< std::function< gpr_timespec()> > next_issuers_
 
std::vector< std::unique_ptr< PerThreadShutdownState > > shutdown_state_
 

Additional Inherited Members

- Protected Member Functions inherited from grpc::testing::Client
void CompleteThread ()
 
void EndThreads ()
 
void MaybeStartRequests ()
 
std::function< gpr_timespec()> NextIssuer (int thread_idx)
 
void SetupLoadTest (const ClientConfig &config, size_t num_threads)
 
void StartThreads (size_t num_threads)
 

Detailed Description

template<class StubType, class RequestType>
class grpc::testing::AsyncClient< StubType, RequestType >

Definition at line 152 of file client_async.cc.

Constructor & Destructor Documentation

◆ AsyncClient()

template<class StubType , class RequestType >
grpc::testing::AsyncClient< StubType, RequestType >::AsyncClient ( const ClientConfig &  config,
std::function< ClientRpcContext *(StubType *, std::function< gpr_timespec()> next_issue, const RequestType &)>  setup_ctx,
std::function< std::unique_ptr< StubType >(std::shared_ptr< Channel >)>  create_stub 
)
inline

Definition at line 162 of file client_async.cc.

◆ ~AsyncClient()

template<class StubType , class RequestType >
grpc::testing::AsyncClient< StubType, RequestType >::~AsyncClient ( )
inlineoverride

Definition at line 196 of file client_async.cc.

Member Function Documentation

◆ DestroyMultithreading()

template<class StubType , class RequestType >
void grpc::testing::AsyncClient< StubType, RequestType >::DestroyMultithreading ( )
inlinefinalprivatevirtual

Implements grpc::testing::Client.

Definition at line 232 of file client_async.cc.

◆ GetPollCount()

template<class StubType , class RequestType >
int grpc::testing::AsyncClient< StubType, RequestType >::GetPollCount ( )
inlineoverridevirtual

Reimplemented from grpc::testing::Client.

Definition at line 206 of file client_async.cc.

◆ NextIssuer()

template<class StubType , class RequestType >
std::function<gpr_timespec()> grpc::testing::Client::NextIssuer
inline

Definition at line 388 of file client.h.

◆ NumThreads()

template<class StubType , class RequestType >
int grpc::testing::AsyncClient< StubType, RequestType >::NumThreads ( const ClientConfig &  config)
inlineprivate

Definition at line 224 of file client_async.cc.

◆ ProcessTag()

template<class StubType , class RequestType >
ClientRpcContext* grpc::testing::AsyncClient< StubType, RequestType >::ProcessTag ( size_t  thread_idx,
void *  tag 
)
inlineprivate

Definition at line 243 of file client_async.cc.

◆ SetupLoadTest()

template<class StubType , class RequestType >
void grpc::testing::Client::SetupLoadTest
inline

Definition at line 355 of file client.h.

◆ ThreadFunc()

template<class StubType , class RequestType >
void grpc::testing::AsyncClient< StubType, RequestType >::ThreadFunc ( size_t  thread_idx,
Client::Thread t 
)
inlinefinalprivatevirtual

Implements grpc::testing::Client.

Definition at line 259 of file client_async.cc.

Member Data Documentation

◆ cli_cqs_

template<class StubType , class RequestType >
std::vector<std::unique_ptr<CompletionQueue> > grpc::testing::AsyncClient< StubType, RequestType >::cli_cqs_
private

Definition at line 297 of file client_async.cc.

◆ closed_loop_

template<class StubType , class RequestType >
bool grpc::testing::Client::closed_loop_

Definition at line 336 of file client.h.

◆ cq_

template<class StubType , class RequestType >
std::vector<int> grpc::testing::AsyncClient< StubType, RequestType >::cq_
private

Definition at line 298 of file client_async.cc.

◆ next_issuers_

template<class StubType , class RequestType >
std::vector<std::function<gpr_timespec()> > grpc::testing::AsyncClient< StubType, RequestType >::next_issuers_
private

Definition at line 299 of file client_async.cc.

◆ num_async_threads_

template<class StubType , class RequestType >
const int grpc::testing::AsyncClient< StubType, RequestType >::num_async_threads_
protected

Definition at line 215 of file client_async.cc.

◆ shutdown_state_

template<class StubType , class RequestType >
std::vector<std::unique_ptr<PerThreadShutdownState> > grpc::testing::AsyncClient< StubType, RequestType >::shutdown_state_
private

Definition at line 300 of file client_async.cc.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:33