aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/bm_cq.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/microbenchmarks/bm_cq.cc')
-rw-r--r--test/cpp/microbenchmarks/bm_cq.cc9
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);