diff options
Diffstat (limited to 'test/cpp/microbenchmarks/bm_call_create.cc')
-rw-r--r-- | test/cpp/microbenchmarks/bm_call_create.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index f25bcd2df8..e2e5bbbe00 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -55,10 +55,12 @@ extern "C" { #include "src/core/lib/transport/transport_impl.h" } -#include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" -auto &force_library_initialization = Library::get(); +static struct Init { + Init() { grpc_init(); } + ~Init() { grpc_shutdown(); } +} g_init; class BaseChannelFixture { public: @@ -87,7 +89,6 @@ class LameChannel : public BaseChannelFixture { template <class Fixture> static void BM_CallCreateDestroy(benchmark::State &state) { - TrackCounters track_counters; Fixture fixture; grpc_completion_queue *cq = grpc_completion_queue_create(NULL); gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); @@ -99,7 +100,6 @@ static void BM_CallCreateDestroy(benchmark::State &state) { deadline, NULL)); } grpc_completion_queue_destroy(cq); - track_counters.Finish(state); } BENCHMARK_TEMPLATE(BM_CallCreateDestroy, InsecureChannel); @@ -316,7 +316,6 @@ class SendEmptyMetadata { // perform on said filter. template <class Fixture, class TestOp> static void BM_IsolatedFilter(benchmark::State &state) { - TrackCounters track_counters; Fixture fixture; std::ostringstream label; @@ -372,7 +371,6 @@ static void BM_IsolatedFilter(benchmark::State &state) { gpr_free(call_stack); state.SetLabel(label.str()); - track_counters.Finish(state); } typedef Fixture<nullptr, 0> NoFilter; |