diff options
author | Craig Tiller <ctiller@google.com> | 2017-08-31 10:54:11 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-08-31 10:54:11 -0700 |
commit | 8fd40d5ed9303c693865ff431b7565173a4b898e (patch) | |
tree | 5d3f6ce958de74e79a8bbaf71b7eb8bbd8acfecd /test/cpp/microbenchmarks/bm_cq.cc | |
parent | c9c78ee96c5a73234513decd398a63d48f14aa89 (diff) | |
parent | 8d51e8d17e012f81ca8e94c18f525e1781130481 (diff) |
Merge github.com:grpc/grpc into wc
Diffstat (limited to 'test/cpp/microbenchmarks/bm_cq.cc')
-rw-r--r-- | test/cpp/microbenchmarks/bm_cq.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 6bb6ad8018..a0c0414f2f 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -23,6 +23,7 @@ #include <grpc++/completion_queue.h> #include <grpc++/impl/grpc_library.h> #include <grpc/grpc.h> +#include <grpc/support/log.h> #include "test/cpp/microbenchmarks/helpers.h" extern "C" { @@ -69,7 +70,7 @@ BENCHMARK(BM_CreateDestroyCore); static void DoneWithCompletionOnStack(grpc_exec_ctx* exec_ctx, void* arg, grpc_cq_completion* completion) {} -class DummyTag final : public internal::CompletionQueueTag { +class DummyTag final : public CompletionQueueTag { public: bool FinalizeResult(void** tag, bool* status) override { return true; } }; @@ -82,7 +83,7 @@ static void BM_Pass1Cpp(benchmark::State& state) { grpc_cq_completion completion; DummyTag dummy_tag; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_cq_begin_op(c_cq, &dummy_tag); + GPR_ASSERT(grpc_cq_begin_op(c_cq, &dummy_tag)); grpc_cq_end_op(&exec_ctx, c_cq, &dummy_tag, GRPC_ERROR_NONE, DoneWithCompletionOnStack, NULL, &completion); grpc_exec_ctx_finish(&exec_ctx); @@ -102,7 +103,7 @@ static void BM_Pass1Core(benchmark::State& state) { while (state.KeepRunning()) { grpc_cq_completion completion; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_cq_begin_op(cq, NULL); + GPR_ASSERT(grpc_cq_begin_op(cq, NULL)); grpc_cq_end_op(&exec_ctx, cq, NULL, GRPC_ERROR_NONE, DoneWithCompletionOnStack, NULL, &completion); grpc_exec_ctx_finish(&exec_ctx); @@ -121,7 +122,7 @@ static void BM_Pluck1Core(benchmark::State& state) { while (state.KeepRunning()) { grpc_cq_completion completion; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_cq_begin_op(cq, NULL); + GPR_ASSERT(grpc_cq_begin_op(cq, NULL)); grpc_cq_end_op(&exec_ctx, cq, NULL, GRPC_ERROR_NONE, DoneWithCompletionOnStack, NULL, &completion); grpc_exec_ctx_finish(&exec_ctx); |