|
|
@ -73,7 +73,7 @@ class SynchronousClient : public Client { |
|
|
|
SetupLoadTest(config, num_threads_); |
|
|
|
SetupLoadTest(config, num_threads_); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
virtual ~SynchronousClient() { EndThreads(); } |
|
|
|
virtual ~SynchronousClient() {}; |
|
|
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
protected: |
|
|
|
void WaitToIssue(int thread_idx) { |
|
|
|
void WaitToIssue(int thread_idx) { |
|
|
@ -91,8 +91,7 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient { |
|
|
|
public: |
|
|
|
public: |
|
|
|
SynchronousUnaryClient(const ClientConfig& config): |
|
|
|
SynchronousUnaryClient(const ClientConfig& config): |
|
|
|
SynchronousClient(config) {StartThreads(num_threads_);} |
|
|
|
SynchronousClient(config) {StartThreads(num_threads_);} |
|
|
|
~SynchronousUnaryClient() {} |
|
|
|
~SynchronousUnaryClient() {EndThreads();} |
|
|
|
|
|
|
|
|
|
|
|
bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { |
|
|
|
bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { |
|
|
|
WaitToIssue(thread_idx); |
|
|
|
WaitToIssue(thread_idx); |
|
|
|
auto* stub = channels_[thread_idx % channels_.size()].get_stub(); |
|
|
|
auto* stub = channels_[thread_idx % channels_.size()].get_stub(); |
|
|
|