Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
grpc::testing::CallbackClient Class Referenceabstract
Inheritance diagram for grpc::testing::CallbackClient:
Inheritance graph
[legend]

Public Member Functions

 CallbackClient (const ClientConfig &config)
 
gpr_timespec NextRPCIssueTime ()
 
void NotifyMainThreadOfThreadCompletion ()
 
 ~CallbackClient () override
 
- Public Member Functions inherited from grpc::testing::ClientImpl< BenchmarkService::Stub, SimpleRequest >
 ClientImpl (const ClientConfig &config, std::function< std::unique_ptr< BenchmarkService::Stub >(std::shared_ptr< Channel >)> create_stub)
 
const SimpleRequest * request ()
 
void WaitForChannelsToConnect ()
 
 ~ClientImpl () override
 
- Public Member Functions inherited from grpc::testing::Client
void AwaitThreadsCompletion ()
 
 Client ()
 
double GetLatencyCollectionIntervalInSeconds ()
 
virtual int GetPollCount ()
 
bool IsClosedLoop ()
 
ClientStats Mark (bool reset)
 
gpr_timespec NextIssueTime (int thread_idx)
 
bool ThreadCompleted ()
 
virtual ~Client ()
 

Protected Member Functions

virtual void InitThreadFuncImpl (size_t thread_idx)=0
 
void ThreadFunc (size_t thread_idx, Thread *t) override
 
virtual bool ThreadFuncImpl (Thread *t, size_t thread_idx)=0
 
- 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)
 

Protected Attributes

std::vector< std::unique_ptr< CallbackClientRpcContext > > ctx_
 
size_t num_threads_
 
size_t rpcs_done_
 
std::condition_variable shutdown_cv_
 
std::mutex shutdown_mu_
 
size_t total_outstanding_rpcs_
 
- Protected Attributes inherited from grpc::testing::ClientImpl< BenchmarkService::Stub, SimpleRequest >
std::vector< ClientChannelInfo > channels_
 
const int cores_
 
std::function< std::unique_ptr< BenchmarkService::Stub >const std::shared_ptr< Channel > &)> create_stub_
 
SimpleRequest 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)
 

Private Attributes

std::mutex next_issue_time_mu_
 

Detailed Description

Definition at line 64 of file test/cpp/qps/client_callback.cc.

Constructor & Destructor Documentation

◆ CallbackClient()

grpc::testing::CallbackClient::CallbackClient ( const ClientConfig &  config)
inlineexplicit

Definition at line 67 of file test/cpp/qps/client_callback.cc.

◆ ~CallbackClient()

grpc::testing::CallbackClient::~CallbackClient ( )
inlineoverride

Definition at line 80 of file test/cpp/qps/client_callback.cc.

Member Function Documentation

◆ DestroyMultithreading()

void grpc::testing::CallbackClient::DestroyMultithreading ( )
inlinefinalprivatevirtual

Wait until all outstanding Callback RPCs are done

Implements grpc::testing::Client.

Definition at line 136 of file test/cpp/qps/client_callback.cc.

◆ InitThreadFuncImpl()

virtual void grpc::testing::CallbackClient::InitThreadFuncImpl ( size_t  thread_idx)
protectedpure virtual

◆ NextRPCIssueTime()

gpr_timespec grpc::testing::CallbackClient::NextRPCIssueTime ( )
inline

Definition at line 96 of file test/cpp/qps/client_callback.cc.

◆ NotifyMainThreadOfThreadCompletion()

void grpc::testing::CallbackClient::NotifyMainThreadOfThreadCompletion ( )
inline

The main thread of the benchmark will be waiting on DestroyMultithreading. Increment the rpcs_done_ variable to signify that the Callback RPC after thread completion is done. When the last outstanding rpc increments the counter it should also signal the main thread's conditional variable.

Definition at line 88 of file test/cpp/qps/client_callback.cc.

◆ NumThreads()

int grpc::testing::CallbackClient::NumThreads ( const ClientConfig &  config)
inlineprivate

Definition at line 124 of file test/cpp/qps/client_callback.cc.

◆ ThreadFunc()

void grpc::testing::CallbackClient::ThreadFunc ( size_t  thread_idx,
Thread t 
)
inlineoverrideprotectedvirtual

Implements grpc::testing::Client.

Definition at line 116 of file test/cpp/qps/client_callback.cc.

◆ ThreadFuncImpl()

virtual bool grpc::testing::CallbackClient::ThreadFuncImpl ( Thread t,
size_t  thread_idx 
)
protectedpure virtual

Member Data Documentation

◆ ctx_

std::vector<std::unique_ptr<CallbackClientRpcContext> > grpc::testing::CallbackClient::ctx_
protected

Definition at line 111 of file test/cpp/qps/client_callback.cc.

◆ next_issue_time_mu_

std::mutex grpc::testing::CallbackClient::next_issue_time_mu_
private

Definition at line 122 of file test/cpp/qps/client_callback.cc.

◆ num_threads_

size_t grpc::testing::CallbackClient::num_threads_
protected

Definition at line 102 of file test/cpp/qps/client_callback.cc.

◆ rpcs_done_

size_t grpc::testing::CallbackClient::rpcs_done_
protected

Definition at line 109 of file test/cpp/qps/client_callback.cc.

◆ shutdown_cv_

std::condition_variable grpc::testing::CallbackClient::shutdown_cv_
protected

Definition at line 107 of file test/cpp/qps/client_callback.cc.

◆ shutdown_mu_

std::mutex grpc::testing::CallbackClient::shutdown_mu_
protected

Definition at line 106 of file test/cpp/qps/client_callback.cc.

◆ total_outstanding_rpcs_

size_t grpc::testing::CallbackClient::total_outstanding_rpcs_
protected

Definition at line 103 of file test/cpp/qps/client_callback.cc.


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


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