aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/bm_error.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-12-06 09:47:54 -0800
committerGravatar GitHub <noreply@github.com>2017-12-06 09:47:54 -0800
commit8cf1470a51ea276ca84825e7495d4ee24743540d (patch)
tree72385cc865094115bc08cb813201d48cb09840bb /test/cpp/microbenchmarks/bm_error.cc
parent1d4e99508409be052bd129ba507bae1fbe7eb7fa (diff)
Revert "Revert "All instances of exec_ctx being passed around in src/core removed""
Diffstat (limited to 'test/cpp/microbenchmarks/bm_error.cc')
-rw-r--r--test/cpp/microbenchmarks/bm_error.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc
index bbd8b3c339..d12f475a49 100644
--- a/test/cpp/microbenchmarks/bm_error.cc
+++ b/test/cpp/microbenchmarks/bm_error.cc
@@ -246,14 +246,14 @@ template <class Fixture>
static void BM_ErrorGetStatus(benchmark::State& state) {
TrackCounters track_counters;
Fixture fixture;
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_core::ExecCtx exec_ctx;
while (state.KeepRunning()) {
grpc_status_code status;
grpc_slice slice;
- grpc_error_get_status(&exec_ctx, fixture.error(), fixture.deadline(),
- &status, &slice, nullptr, nullptr);
+ grpc_error_get_status(fixture.error(), fixture.deadline(), &status, &slice,
+ nullptr, nullptr);
}
- grpc_exec_ctx_finish(&exec_ctx);
+
track_counters.Finish(state);
}
@@ -261,13 +261,13 @@ template <class Fixture>
static void BM_ErrorGetStatusCode(benchmark::State& state) {
TrackCounters track_counters;
Fixture fixture;
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_core::ExecCtx exec_ctx;
while (state.KeepRunning()) {
grpc_status_code status;
- grpc_error_get_status(&exec_ctx, fixture.error(), fixture.deadline(),
- &status, nullptr, nullptr, nullptr);
+ grpc_error_get_status(fixture.error(), fixture.deadline(), &status, nullptr,
+ nullptr, nullptr);
}
- grpc_exec_ctx_finish(&exec_ctx);
+
track_counters.Finish(state);
}
@@ -275,13 +275,13 @@ template <class Fixture>
static void BM_ErrorHttpError(benchmark::State& state) {
TrackCounters track_counters;
Fixture fixture;
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_core::ExecCtx exec_ctx;
while (state.KeepRunning()) {
grpc_http2_error_code error;
- grpc_error_get_status(&exec_ctx, fixture.error(), fixture.deadline(),
- nullptr, nullptr, &error, nullptr);
+ grpc_error_get_status(fixture.error(), fixture.deadline(), nullptr, nullptr,
+ &error, nullptr);
}
- grpc_exec_ctx_finish(&exec_ctx);
+
track_counters.Finish(state);
}