diff options
Diffstat (limited to 'test/cpp/qps/client_sync.cc')
-rw-r--r-- | test/cpp/qps/client_sync.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 264293561d..c28dc91321 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -99,7 +99,9 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient { class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { public: SynchronousStreamingClient(const ClientConfig& config) - : SynchronousClient(config), context_(num_threads_), stream_(num_threads_) { + : SynchronousClient(config), + context_(num_threads_), + stream_(num_threads_) { for (size_t thread_idx = 0; thread_idx < num_threads_; thread_idx++) { auto* stub = channels_[thread_idx % channels_.size()].get_stub(); stream_[thread_idx] = stub->StreamingCall(&context_[thread_idx]); @@ -110,8 +112,8 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { EndThreads(); for (auto stream = stream_.begin(); stream != stream_.end(); stream++) { if (*stream) { - (*stream)->WritesDone(); - EXPECT_TRUE((*stream)->Finish().IsOk()); + (*stream)->WritesDone(); + EXPECT_TRUE((*stream)->Finish().IsOk()); } } } @@ -119,7 +121,7 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { double start = Timer::Now(); if (stream_[thread_idx]->Write(request_) && - stream_[thread_idx]->Read(&responses_[thread_idx])) { + stream_[thread_idx]->Read(&responses_[thread_idx])) { histogram->Add((Timer::Now() - start) * 1e9); return true; } @@ -128,8 +130,8 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { private: std::vector<grpc::ClientContext> context_; - std::vector<std::unique_ptr<grpc::ClientReaderWriter< - SimpleRequest, SimpleResponse>>> stream_; + std::vector<std::unique_ptr< + grpc::ClientReaderWriter<SimpleRequest, SimpleResponse>>> stream_; }; std::unique_ptr<Client> CreateSynchronousUnaryClient( |