diff options
author | 2017-04-24 13:09:12 -0700 | |
---|---|---|
committer | 2017-04-24 13:09:12 -0700 | |
commit | 956920d84ead617222fe073f2e877211dfb9ce81 (patch) | |
tree | f9d889a5d763a3648e19693d7975a8ac97a14436 /test/cpp/microbenchmarks/bm_pollset.cc | |
parent | 890b584ee95688044fef278481fa3fc45bed34c5 (diff) |
clang-format
Diffstat (limited to 'test/cpp/microbenchmarks/bm_pollset.cc')
-rw-r--r-- | test/cpp/microbenchmarks/bm_pollset.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc index 19b3ba0a3c..f5e8d13881 100644 --- a/test/cpp/microbenchmarks/bm_pollset.cc +++ b/test/cpp/microbenchmarks/bm_pollset.cc @@ -157,17 +157,18 @@ static void BM_PollAddFd(benchmark::State& state) { grpc_pollset_init(ps, &mu); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_wakeup_fd wakeup_fd; - GPR_ASSERT(GRPC_LOG_IF_ERROR("wakeup_fd_init", grpc_wakeup_fd_init(&wakeup_fd))); - grpc_fd *fd = grpc_fd_create(wakeup_fd.read_fd, "xxx"); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("wakeup_fd_init", grpc_wakeup_fd_init(&wakeup_fd))); + grpc_fd* fd = grpc_fd_create(wakeup_fd.read_fd, "xxx"); while (state.KeepRunning()) { - grpc_pollset_add_fd(&exec_ctx, ps, fd); - grpc_exec_ctx_flush(&exec_ctx); + grpc_pollset_add_fd(&exec_ctx, ps, fd); + grpc_exec_ctx_flush(&exec_ctx); } grpc_fd_orphan(&exec_ctx, fd, NULL, NULL, "xxx"); grpc_closure shutdown_ps_closure; grpc_closure_init(&shutdown_ps_closure, shutdown_ps, ps, grpc_schedule_on_exec_ctx); - gpr_mu_lock(mu); + gpr_mu_lock(mu); grpc_pollset_shutdown(&exec_ctx, ps, &shutdown_ps_closure); gpr_mu_unlock(mu); grpc_exec_ctx_finish(&exec_ctx); |