aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/server_async.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-03-04 13:54:39 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-03-04 13:54:39 -0800
commita182bf12b0ef71e6fdcb93a818c4476a9d142e37 (patch)
treee548b23c362f5306a698e758fcb835e932f507d8 /test/cpp/qps/server_async.cc
parentce78a19da284a70ec81de36a394728bdb33fcab5 (diff)
clang-format
Diffstat (limited to 'test/cpp/qps/server_async.cc')
-rw-r--r--test/cpp/qps/server_async.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index 741a85802a..64aca957e4 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -57,11 +57,12 @@
#include <grpc/support/log.h>
namespace grpc {
- namespace testing {
+namespace testing {
class AsyncQpsServerTest : public Server {
public:
- AsyncQpsServerTest(const ServerConfig& config, int port) : srv_cq_(), async_service_(&srv_cq_), server_(nullptr) {
+ AsyncQpsServerTest(const ServerConfig &config, int port)
+ : srv_cq_(), async_service_(&srv_cq_), server_(nullptr) {
char *server_address = NULL;
gpr_join_host_port(&server_address, "::", port);
@@ -103,7 +104,7 @@ class AsyncQpsServerTest : public Server {
~AsyncQpsServerTest() {
server_->Shutdown();
srv_cq_.Shutdown();
- for (auto& thr: threads_) {
+ for (auto &thr : threads_) {
thr.join();
}
while (!contexts_.empty()) {
@@ -117,8 +118,8 @@ class AsyncQpsServerTest : public Server {
public:
ServerRpcContext() {}
virtual ~ServerRpcContext(){};
- virtual bool RunNextState() = 0;// do next state, return false if all done
- virtual void Reset() = 0; // start this back at a clean state
+ virtual bool RunNextState() = 0; // do next state, return false if all done
+ virtual void Reset() = 0; // start this back at a clean state
};
static void *tag(ServerRpcContext *func) {
return reinterpret_cast<void *>(func);
@@ -201,9 +202,10 @@ class AsyncQpsServerTest : public Server {
std::forward_list<ServerRpcContext *> contexts_;
};
-std::unique_ptr<Server> CreateAsyncServer(const ServerConfig& config, int port) {
- return std::unique_ptr<Server>(new AsyncQpsServerTest(config, port));
+std::unique_ptr<Server> CreateAsyncServer(const ServerConfig &config,
+ int port) {
+ return std::unique_ptr<Server>(new AsyncQpsServerTest(config, port));
}
- }// namespace testing
-}// namespace grpc
+} // namespace testing
+} // namespace grpc