clang-format

pull/5008/head
Vijay Pai 9 years ago
parent 21e5d2b2f1
commit 2ed337aab3
  1. 2
      test/cpp/qps/driver.cc
  2. 10
      test/cpp/qps/qps_worker.cc
  3. 1
      test/cpp/qps/qps_worker.h

@ -289,7 +289,7 @@ void RunQuit() {
auto workers = get_hosts("QPS_WORKERS");
for (size_t i = 0; i < workers.size(); i++) {
auto stub = WorkerService::NewStub(
CreateChannel(workers[i], InsecureChannelCredentials()));
CreateChannel(workers[i], InsecureChannelCredentials()));
Void dummy;
grpc::ClientContext ctx;
GPR_ASSERT(stub->QuitWorker(&ctx, dummy, &dummy).ok());

@ -107,8 +107,8 @@ static std::unique_ptr<Server> CreateServer(const ServerConfig& config) {
class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service {
public:
WorkerServiceImpl(int server_port, QpsWorker *worker)
: acquired_(false), server_port_(server_port), worker_(worker) {}
WorkerServiceImpl(int server_port, QpsWorker* worker)
: acquired_(false), server_port_(server_port), worker_(worker) {}
Status RunClient(ServerContext* ctx,
ServerReaderWriter<ClientStatus, ClientArgs>* stream)
@ -138,7 +138,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service {
return ret;
}
Status QuitWorker(ServerContext *ctx, const Void*, Void*) GRPC_OVERRIDE {
Status QuitWorker(ServerContext* ctx, const Void*, Void*) GRPC_OVERRIDE {
InstanceGuard g(this);
if (!g.Acquired()) {
return Status(StatusCode::RESOURCE_EXHAUSTED, "");
@ -147,7 +147,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service {
worker_->MarkDone();
return Status::OK;
}
private:
// Protect against multiple clients using this worker at once.
class InstanceGuard {
@ -258,7 +258,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service {
std::mutex mu_;
bool acquired_;
int server_port_;
QpsWorker *worker_;
QpsWorker* worker_;
};
QpsWorker::QpsWorker(int driver_port, int server_port) {

@ -53,6 +53,7 @@ class QpsWorker {
bool Done() const;
void MarkDone();
private:
std::unique_ptr<WorkerServiceImpl> impl_;
std::unique_ptr<Server> server_;

Loading…
Cancel
Save