clang-format

pull/7285/head
Vijay Pai 9 years ago
parent 40317fd720
commit 5fde20d9f0
  1. 16
      test/cpp/qps/client.h
  2. 1
      test/cpp/qps/client_async.cc
  3. 1
      test/cpp/qps/client_sync.cc
  4. 4
      test/cpp/qps/driver.cc
  5. 7
      test/cpp/qps/server_async.cc

@ -114,10 +114,14 @@ class ClientRequestCreator<ByteBuffer> {
class HistogramEntry GRPC_FINAL {
public:
HistogramEntry(): used_(false) {}
bool used() const {return used_;}
double value() const {return value_;}
void set_value(double v) {used_ = true; value_ = v;}
HistogramEntry() : used_(false) {}
bool used() const { return used_; }
double value() const { return value_; }
void set_value(double v) {
used_ = true;
value_ = v;
}
private:
bool used_;
double value_;
@ -171,6 +175,7 @@ class Client {
threads_complete_.wait(g);
}
}
protected:
bool closed_loop_;
@ -254,8 +259,7 @@ class Client {
n->Swap(&histogram_);
}
void EndSwap() {
}
void EndSwap() {}
void MergeStatsInto(Histogram* hist) {
std::unique_lock<std::mutex> g(mu_);

@ -198,6 +198,7 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
}
}
}
protected:
const int num_async_threads_;

@ -87,6 +87,7 @@ class SynchronousClient
size_t num_threads_;
std::vector<SimpleResponse> responses_;
private:
void DestroyMultithreading() GRPC_OVERRIDE GRPC_FINAL { EndThreads(); }
};

@ -497,8 +497,8 @@ bool RunQuit() {
ctx.set_fail_fast(false);
Status s = stub->QuitWorker(&ctx, dummy, &dummy);
if (!s.ok()) {
gpr_log(GPR_ERROR, "Worker %zu could not be properly quit because %s",
i, s.error_message().c_str());
gpr_log(GPR_ERROR, "Worker %zu could not be properly quit because %s", i,
s.error_message().c_str());
result = false;
}
}

@ -132,8 +132,7 @@ class AsyncQpsServerTest : public Server {
(*ss)->shutdown = true;
}
// TODO (vpai): Remove this deadline and allow Shutdown to finish properly
auto deadline =
std::chrono::system_clock::now() + std::chrono::seconds(3);
auto deadline = std::chrono::system_clock::now() + std::chrono::seconds(3);
server_->Shutdown(deadline);
for (auto cq = srv_cqs_.begin(); cq != srv_cqs_.end(); ++cq) {
(*cq)->Shutdown();
@ -164,7 +163,9 @@ class AsyncQpsServerTest : public Server {
// Proceed while holding a lock to make sure that
// this thread isn't supposed to shut down
std::lock_guard<std::mutex> l(shutdown_state_[thread_idx]->mutex);
if (shutdown_state_[thread_idx]->shutdown) { return; }
if (shutdown_state_[thread_idx]->shutdown) {
return;
}
const bool still_going = ctx->RunNextState(ok);
// if this RPC context is done, refresh it
if (!still_going) {

Loading…
Cancel
Save