diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-29 19:07:44 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-29 19:07:44 -0800 |
commit | c354269ba7bd1f6dfe9c86ba18f38fc8e346dcfc (patch) | |
tree | bcc5b75945a13ad9c2e805b66989206ebfd02d6f /test/cpp | |
parent | 26e934245d2af33f613f932f290315c5c9feca27 (diff) |
Remove _ prefixed variable names
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/end2end/client_lb_end2end_test.cc | 2 | ||||
-rw-r--r-- | test/cpp/end2end/grpclb_end2end_test.cc | 2 | ||||
-rw-r--r-- | test/cpp/grpclb/grpclb_test.cc | 2 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_call_create.cc | 4 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 10 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_chttp2_transport.cc | 10 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_closure.cc | 42 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_cq.cc | 6 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_error.cc | 6 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_fullstack_trickle.cc | 2 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_metadata.cc | 26 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_pollset.cc | 8 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/fullstack_fixtures.h | 2 | ||||
-rw-r--r-- | test/cpp/naming/resolver_component_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/performance/writes_per_rpc_test.cc | 2 |
15 files changed, 64 insertions, 64 deletions
diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index f2f3cc3425..e6e6e71f42 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -112,7 +112,7 @@ class ClientLbEnd2endTest : public ::testing::Test { } void SetNextResolution(const std::vector<int>& ports) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_lb_addresses* addresses = grpc_lb_addresses_create(ports.size(), nullptr); for (size_t i = 0; i < ports.size(); ++i) { diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index c5c53b8b8a..48cdd433b2 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -451,7 +451,7 @@ class GrpclbEnd2endTest : public ::testing::Test { }; void SetNextResolution(const std::vector<AddressData>& address_data) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_lb_addresses* addresses = grpc_lb_addresses_create(address_data.size(), nullptr); for (size_t i = 0; i < address_data.size(); ++i) { diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 792c82639c..fd455c4c9a 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -562,7 +562,7 @@ static void perform_request(client_fixture* cf) { #define BALANCERS_NAME "lb.name" static void setup_client(const server_fixture* lb_server, const server_fixture* backends, client_fixture* cf) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; char* expected_target_names = nullptr; const char* backends_name = lb_server->servers_hostport; diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index b17f79613a..5c2c38c27d 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -521,7 +521,7 @@ static void BM_IsolatedFilter(benchmark::State& state) { label << " #has_dummy_filter"; } - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; size_t channel_size = grpc_channel_stack_size( filters.size() == 0 ? nullptr : &filters[0], filters.size()); grpc_channel_stack* channel_stack = @@ -692,7 +692,7 @@ class IsolatedCallFixture : public TrackCounters { builder, &isolated_call_filter::isolated_call_filter, nullptr, nullptr)); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; channel_ = grpc_channel_create_with_builder(builder, GRPC_CLIENT_CHANNEL); } cq_ = grpc_completion_queue_create_for_next(nullptr); diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 6b6b441d93..4b7310389c 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -50,7 +50,7 @@ static grpc_slice MakeSlice(std::vector<uint8_t> bytes) { static void BM_HpackEncoderInitDestroy(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hpack_compressor c; while (state.KeepRunning()) { grpc_chttp2_hpack_compressor_init(&c); @@ -64,7 +64,7 @@ BENCHMARK(BM_HpackEncoderInitDestroy); static void BM_HpackEncoderEncodeDeadline(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_millis saved_now = grpc_core::ExecCtx::Get()->Now(); grpc_metadata_batch b; @@ -108,7 +108,7 @@ BENCHMARK(BM_HpackEncoderEncodeDeadline); template <class Fixture> static void BM_HpackEncoderEncodeHeader(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; static bool logged_representative_output = false; grpc_metadata_batch b; @@ -425,7 +425,7 @@ BENCHMARK_TEMPLATE(BM_HpackEncoderEncodeHeader, static void BM_HpackParserInitDestroy(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hpack_parser p; while (state.KeepRunning()) { grpc_chttp2_hpack_parser_init(&p); @@ -444,7 +444,7 @@ static void UnrefHeader(void* user_data, grpc_mdelem md) { template <class Fixture, void (*OnHeader)(void*, grpc_mdelem)> static void BM_HpackParserParseHeader(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; std::vector<grpc_slice> init_slices = Fixture::GetInitSlices(); std::vector<grpc_slice> benchmark_slices = Fixture::GetBenchmarkSlices(); grpc_chttp2_hpack_parser p; diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc index 044417830f..43bbbad880 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc @@ -257,7 +257,7 @@ class Stream { static void BM_StreamCreateDestroy(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); Stream s(&f); grpc_transport_stream_op_batch op; @@ -303,7 +303,7 @@ class RepresentativeClientInitialMetadata { template <class Metadata> static void BM_StreamCreateSendInitialMetadataDestroy(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); Stream s(&f); grpc_transport_stream_op_batch op; @@ -354,7 +354,7 @@ BENCHMARK_TEMPLATE(BM_StreamCreateSendInitialMetadataDestroy, static void BM_TransportEmptyOp(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); Stream s(&f); s.Init(state); @@ -387,7 +387,7 @@ std::vector<std::unique_ptr<gpr_event>> done_events; static void BM_TransportStreamSend(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); auto s = std::unique_ptr<Stream>(new Stream(&f)); s->Init(state); @@ -517,7 +517,7 @@ static grpc_slice CreateIncomingDataSlice(size_t length, size_t frame_size) { static void BM_TransportStreamRecv(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); Stream s(&f); s.Init(state); diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc index f28093ae17..4d5a82c3f6 100644 --- a/test/cpp/microbenchmarks/bm_closure.cc +++ b/test/cpp/microbenchmarks/bm_closure.cc @@ -34,7 +34,7 @@ auto& force_library_initialization = Library::get(); static void BM_NoOpExecCtx(benchmark::State& state) { TrackCounters track_counters; while (state.KeepRunning()) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; } track_counters.Finish(state); } @@ -42,7 +42,7 @@ BENCHMARK(BM_NoOpExecCtx); static void BM_WellFlushed(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { grpc_core::ExecCtx::Get()->Flush(); } @@ -68,7 +68,7 @@ static void BM_ClosureInitAgainstCombiner(benchmark::State& state) { TrackCounters track_counters; grpc_combiner* combiner = grpc_combiner_create(); grpc_closure c; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { benchmark::DoNotOptimize(GRPC_CLOSURE_INIT( &c, DoNothing, nullptr, grpc_combiner_scheduler(combiner))); @@ -83,7 +83,7 @@ static void BM_ClosureRunOnExecCtx(benchmark::State& state) { TrackCounters track_counters; grpc_closure c; GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_schedule_on_exec_ctx); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_RUN(&c, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); @@ -95,7 +95,7 @@ BENCHMARK(BM_ClosureRunOnExecCtx); static void BM_ClosureCreateAndRun(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_RUN( GRPC_CLOSURE_CREATE(DoNothing, nullptr, grpc_schedule_on_exec_ctx), @@ -108,7 +108,7 @@ BENCHMARK(BM_ClosureCreateAndRun); static void BM_ClosureInitAndRun(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_closure c; while (state.KeepRunning()) { GRPC_CLOSURE_RUN( @@ -124,7 +124,7 @@ static void BM_ClosureSchedOnExecCtx(benchmark::State& state) { TrackCounters track_counters; grpc_closure c; GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_schedule_on_exec_ctx); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); @@ -140,7 +140,7 @@ static void BM_ClosureSched2OnExecCtx(benchmark::State& state) { grpc_closure c2; GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_schedule_on_exec_ctx); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -159,7 +159,7 @@ static void BM_ClosureSched3OnExecCtx(benchmark::State& state) { GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&c3, DoNothing, nullptr, grpc_schedule_on_exec_ctx); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -176,7 +176,7 @@ static void BM_AcquireMutex(benchmark::State& state) { // for comparison with the combiner stuff below gpr_mu mu; gpr_mu_init(&mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { gpr_mu_lock(&mu); DoNothing(nullptr, GRPC_ERROR_NONE); @@ -192,7 +192,7 @@ static void BM_TryAcquireMutex(benchmark::State& state) { // for comparison with the combiner stuff below gpr_mu mu; gpr_mu_init(&mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { if (gpr_mu_trylock(&mu)) { DoNothing(nullptr, GRPC_ERROR_NONE); @@ -210,7 +210,7 @@ static void BM_AcquireSpinlock(benchmark::State& state) { TrackCounters track_counters; // for comparison with the combiner stuff below gpr_spinlock mu = GPR_SPINLOCK_INITIALIZER; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { gpr_spinlock_lock(&mu); DoNothing(nullptr, GRPC_ERROR_NONE); @@ -225,7 +225,7 @@ static void BM_TryAcquireSpinlock(benchmark::State& state) { TrackCounters track_counters; // for comparison with the combiner stuff below gpr_spinlock mu = GPR_SPINLOCK_INITIALIZER; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { if (gpr_spinlock_trylock(&mu)) { DoNothing(nullptr, GRPC_ERROR_NONE); @@ -244,7 +244,7 @@ static void BM_ClosureSchedOnCombiner(benchmark::State& state) { grpc_combiner* combiner = grpc_combiner_create(); grpc_closure c; GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); @@ -262,7 +262,7 @@ static void BM_ClosureSched2OnCombiner(benchmark::State& state) { grpc_closure c2; GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -283,7 +283,7 @@ static void BM_ClosureSched3OnCombiner(benchmark::State& state) { GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); GRPC_CLOSURE_INIT(&c3, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -306,7 +306,7 @@ static void BM_ClosureSched2OnTwoCombiners(benchmark::State& state) { grpc_combiner_scheduler(combiner1)); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner2)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -335,7 +335,7 @@ static void BM_ClosureSched4OnTwoCombiners(benchmark::State& state) { grpc_combiner_scheduler(combiner1)); GRPC_CLOSURE_INIT(&c4, DoNothing, nullptr, grpc_combiner_scheduler(combiner2)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -381,7 +381,7 @@ class Rescheduler { static void BM_ClosureReschedOnExecCtx(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Rescheduler r(state, grpc_schedule_on_exec_ctx); r.ScheduleFirst(); @@ -391,7 +391,7 @@ BENCHMARK(BM_ClosureReschedOnExecCtx); static void BM_ClosureReschedOnCombiner(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_combiner* combiner = grpc_combiner_create(); Rescheduler r(state, grpc_combiner_scheduler(combiner)); r.ScheduleFirst(); @@ -404,7 +404,7 @@ BENCHMARK(BM_ClosureReschedOnCombiner); static void BM_ClosureReschedOnCombinerFinally(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_combiner* combiner = grpc_combiner_create(); Rescheduler r(state, grpc_combiner_finally_scheduler(combiner)); r.ScheduleFirstAgainstDifferentScheduler(grpc_combiner_scheduler(combiner)); diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 16f451d98f..97242598f1 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -81,7 +81,7 @@ static void BM_Pass1Cpp(benchmark::State& state) { while (state.KeepRunning()) { grpc_cq_completion completion; DummyTag dummy_tag; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_cq_begin_op(c_cq, &dummy_tag)); grpc_cq_end_op(c_cq, &dummy_tag, GRPC_ERROR_NONE, DoneWithCompletionOnStack, nullptr, &completion); @@ -101,7 +101,7 @@ static void BM_Pass1Core(benchmark::State& state) { gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); while (state.KeepRunning()) { grpc_cq_completion completion; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_cq_begin_op(cq, nullptr)); grpc_cq_end_op(cq, nullptr, GRPC_ERROR_NONE, DoneWithCompletionOnStack, nullptr, &completion); @@ -120,7 +120,7 @@ static void BM_Pluck1Core(benchmark::State& state) { gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); while (state.KeepRunning()) { grpc_cq_completion completion; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_cq_begin_op(cq, nullptr)); grpc_cq_end_op(cq, nullptr, GRPC_ERROR_NONE, DoneWithCompletionOnStack, nullptr, &completion); diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc index fd888a5a40..d12f475a49 100644 --- a/test/cpp/microbenchmarks/bm_error.cc +++ b/test/cpp/microbenchmarks/bm_error.cc @@ -246,7 +246,7 @@ template <class Fixture> static void BM_ErrorGetStatus(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { grpc_status_code status; grpc_slice slice; @@ -261,7 +261,7 @@ template <class Fixture> static void BM_ErrorGetStatusCode(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { grpc_status_code status; grpc_error_get_status(fixture.error(), fixture.deadline(), &status, nullptr, @@ -275,7 +275,7 @@ template <class Fixture> static void BM_ErrorHttpError(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { grpc_http2_error_code error; grpc_error_get_status(fixture.error(), fixture.deadline(), nullptr, nullptr, diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc index 23ca750307..0212cdddf8 100644 --- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc +++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc @@ -177,7 +177,7 @@ class TrickledCHTTP2 : public EndpointPairFixture { } void Step(bool update_stats) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; inc_time(); size_t client_backlog = grpc_trickle_endpoint_trickle(endpoint_pair_.client); diff --git a/test/cpp/microbenchmarks/bm_metadata.cc b/test/cpp/microbenchmarks/bm_metadata.cc index 62c9a2e335..f1e7890fc0 100644 --- a/test/cpp/microbenchmarks/bm_metadata.cc +++ b/test/cpp/microbenchmarks/bm_metadata.cc @@ -90,7 +90,7 @@ static void BM_MetadataFromNonInternedSlices(benchmark::State& state) { TrackCounters track_counters; gpr_slice k = grpc_slice_from_static_string("key"); gpr_slice v = grpc_slice_from_static_string("value"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -103,7 +103,7 @@ static void BM_MetadataFromInternedSlices(benchmark::State& state) { TrackCounters track_counters; gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_intern(grpc_slice_from_static_string("value")); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -119,7 +119,7 @@ static void BM_MetadataFromInternedSlicesAlreadyInIndex( TrackCounters track_counters; gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_intern(grpc_slice_from_static_string("value")); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem seed = grpc_mdelem_create(k, v, nullptr); while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); @@ -136,7 +136,7 @@ static void BM_MetadataFromInternedKey(benchmark::State& state) { TrackCounters track_counters; gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_from_static_string("value"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -152,7 +152,7 @@ static void BM_MetadataFromNonInternedSlicesWithBackingStore( gpr_slice k = grpc_slice_from_static_string("key"); gpr_slice v = grpc_slice_from_static_string("value"); char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create( k, v, reinterpret_cast<grpc_mdelem_data*>(backing_store))); @@ -168,7 +168,7 @@ static void BM_MetadataFromInternedSlicesWithBackingStore( gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_intern(grpc_slice_from_static_string("value")); char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create( k, v, reinterpret_cast<grpc_mdelem_data*>(backing_store))); @@ -186,7 +186,7 @@ static void BM_MetadataFromInternedKeyWithBackingStore( gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_from_static_string("value"); char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create( k, v, reinterpret_cast<grpc_mdelem_data*>(backing_store))); @@ -201,7 +201,7 @@ static void BM_MetadataFromStaticMetadataStrings(benchmark::State& state) { TrackCounters track_counters; gpr_slice k = GRPC_MDSTR_STATUS; gpr_slice v = GRPC_MDSTR_200; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -216,7 +216,7 @@ static void BM_MetadataFromStaticMetadataStringsNotIndexed( TrackCounters track_counters; gpr_slice k = GRPC_MDSTR_STATUS; gpr_slice v = GRPC_MDSTR_GZIP; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -229,7 +229,7 @@ BENCHMARK(BM_MetadataFromStaticMetadataStringsNotIndexed); static void BM_MetadataRefUnrefExternal(benchmark::State& state) { TrackCounters track_counters; char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem el = grpc_mdelem_create( grpc_slice_from_static_string("a"), grpc_slice_from_static_string("b"), reinterpret_cast<grpc_mdelem_data*>(backing_store)); @@ -245,7 +245,7 @@ BENCHMARK(BM_MetadataRefUnrefExternal); static void BM_MetadataRefUnrefInterned(benchmark::State& state) { TrackCounters track_counters; char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_intern(grpc_slice_from_static_string("value")); grpc_mdelem el = grpc_mdelem_create( @@ -263,7 +263,7 @@ BENCHMARK(BM_MetadataRefUnrefInterned); static void BM_MetadataRefUnrefAllocated(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem el = grpc_mdelem_create(grpc_slice_from_static_string("a"), grpc_slice_from_static_string("b"), nullptr); @@ -278,7 +278,7 @@ BENCHMARK(BM_MetadataRefUnrefAllocated); static void BM_MetadataRefUnrefStatic(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem el = grpc_mdelem_create(GRPC_MDSTR_STATUS, GRPC_MDSTR_200, nullptr); while (state.KeepRunning()) { diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc index 9a859b51ea..d9d5164cce 100644 --- a/test/cpp/microbenchmarks/bm_pollset.cc +++ b/test/cpp/microbenchmarks/bm_pollset.cc @@ -50,7 +50,7 @@ static void BM_CreateDestroyPollset(benchmark::State& state) { size_t ps_sz = grpc_pollset_size(); grpc_pollset* ps = static_cast<grpc_pollset*>(gpr_malloc(ps_sz)); gpr_mu* mu; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_closure shutdown_ps_closure; GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps, grpc_schedule_on_exec_ctx); @@ -114,7 +114,7 @@ static void BM_PollEmptyPollset(benchmark::State& state) { grpc_pollset* ps = static_cast<grpc_pollset*>(gpr_zalloc(ps_sz)); gpr_mu* mu; grpc_pollset_init(ps, &mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_mu_lock(mu); while (state.KeepRunning()) { GRPC_ERROR_UNREF(grpc_pollset_work(ps, nullptr, 0)); @@ -136,7 +136,7 @@ static void BM_PollAddFd(benchmark::State& state) { grpc_pollset* ps = static_cast<grpc_pollset*>(gpr_zalloc(ps_sz)); gpr_mu* mu; grpc_pollset_init(ps, &mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_wakeup_fd wakeup_fd; GPR_ASSERT( GRPC_LOG_IF_ERROR("wakeup_fd_init", grpc_wakeup_fd_init(&wakeup_fd))); @@ -218,7 +218,7 @@ static void BM_SingleThreadPollOneFd(benchmark::State& state) { grpc_pollset* ps = static_cast<grpc_pollset*>(gpr_zalloc(ps_sz)); gpr_mu* mu; grpc_pollset_init(ps, &mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_wakeup_fd wakeup_fd; GRPC_ERROR_UNREF(grpc_wakeup_fd_init(&wakeup_fd)); grpc_fd* wakeup = grpc_fd_create(wakeup_fd.read_fd, "wakeup_read"); diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h index 1520282009..ab0a696e3d 100644 --- a/test/cpp/microbenchmarks/fullstack_fixtures.h +++ b/test/cpp/microbenchmarks/fullstack_fixtures.h @@ -166,7 +166,7 @@ class EndpointPairFixture : public BaseFixture { fixture_configuration.ApplyCommonServerBuilderConfig(&b); server_ = b.BuildAndStart(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; /* add server endpoint to server_ * */ diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index 3bd1df9429..3481d9d1aa 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -196,7 +196,7 @@ void PollPollsetUntilRequestDone(ArgsStruct* args) { time_left.tv_sec, time_left.tv_nsec); GPR_ASSERT(gpr_time_cmp(time_left, gpr_time_0(GPR_TIMESPAN)) >= 0); grpc_pollset_worker* worker = nullptr; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_mu_lock(args->mu); GRPC_LOG_IF_ERROR("pollset_work", grpc_pollset_work(args->pollset, &worker, @@ -275,7 +275,7 @@ void CheckResolverResultLocked(void* argsp, grpc_error* err) { } TEST(ResolverComponentTest, TestResolvesRelevantRecords) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; ArgsStruct args; ArgsInit(&args); args.expected_addrs = ParseExpectedAddrs(FLAGS_expected_addrs); diff --git a/test/cpp/performance/writes_per_rpc_test.cc b/test/cpp/performance/writes_per_rpc_test.cc index c5d29469b2..1711eef303 100644 --- a/test/cpp/performance/writes_per_rpc_test.cc +++ b/test/cpp/performance/writes_per_rpc_test.cc @@ -82,7 +82,7 @@ class EndpointPairFixture { ApplyCommonServerBuilderConfig(&b); server_ = b.BuildAndStart(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; /* add server endpoint to server_ */ { |