|
|
@ -159,6 +159,7 @@ class AsyncClient : public ClientImpl<StubType, RequestType> { |
|
|
|
using Client::SetupLoadTest; |
|
|
|
using Client::SetupLoadTest; |
|
|
|
using Client::NextIssueTime; |
|
|
|
using Client::NextIssueTime; |
|
|
|
using Client::closed_loop_; |
|
|
|
using Client::closed_loop_; |
|
|
|
|
|
|
|
using ClientImpl<StubType, RequestType>::cores_; |
|
|
|
using ClientImpl<StubType, RequestType>::channels_; |
|
|
|
using ClientImpl<StubType, RequestType>::channels_; |
|
|
|
using ClientImpl<StubType, RequestType>::request_; |
|
|
|
using ClientImpl<StubType, RequestType>::request_; |
|
|
|
AsyncClient(const ClientConfig& config, |
|
|
|
AsyncClient(const ClientConfig& config, |
|
|
@ -345,11 +346,11 @@ class AsyncClient : public ClientImpl<StubType, RequestType> { |
|
|
|
private: |
|
|
|
private: |
|
|
|
bool val_; |
|
|
|
bool val_; |
|
|
|
}; |
|
|
|
}; |
|
|
|
static int NumThreads(const ClientConfig& config) { |
|
|
|
int NumThreads(const ClientConfig& config) { |
|
|
|
int num_threads = config.async_client_threads(); |
|
|
|
int num_threads = config.async_client_threads(); |
|
|
|
if (num_threads <= 0) { // Use dynamic sizing
|
|
|
|
if (num_threads <= 0) { // Use dynamic sizing
|
|
|
|
num_threads = gpr_cpu_num_cores(); |
|
|
|
num_threads = cores_; |
|
|
|
gpr_log(GPR_INFO, "Sizing client server to %d threads", num_threads); |
|
|
|
gpr_log(GPR_INFO, "Sizing async client to %d threads", num_threads); |
|
|
|
} |
|
|
|
} |
|
|
|
return num_threads; |
|
|
|
return num_threads; |
|
|
|
} |
|
|
|
} |
|
|
|