diff options
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/microbenchmarks/bm_call_create.cc | 2 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 2 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_closure.cc | 4 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_cq.cc | 2 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_error.cc | 2 | ||||
-rw-r--r-- | test/cpp/microbenchmarks/bm_metadata.cc | 2 |
6 files changed, 11 insertions, 3 deletions
diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index 8fed12ef4e..f25bcd2df8 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -58,6 +58,8 @@ extern "C" { #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" +auto &force_library_initialization = Library::get(); + class BaseChannelFixture { public: BaseChannelFixture(grpc_channel *channel) : channel_(channel) {} diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 029a89db3a..563db758f7 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -45,6 +45,8 @@ extern "C" { #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" +auto &force_library_initialization = Library::get(); + //////////////////////////////////////////////////////////////////////////////// // HPACK encoder // diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc index 8111c9c9fa..28a385b6c1 100644 --- a/test/cpp/microbenchmarks/bm_closure.cc +++ b/test/cpp/microbenchmarks/bm_closure.cc @@ -45,9 +45,7 @@ extern "C" { #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" -#ifdef GPR_LOW_LEVEL_COUNTERS -extern "C" gpr_atm gpr_mu_locks; -#endif +auto& force_library_initialization = Library::get(); static void BM_NoOpExecCtx(benchmark::State& state) { TrackCounters track_counters; diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index c433adb796..91e6a85101 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -48,6 +48,8 @@ extern "C" { namespace grpc { namespace testing { +auto& force_library_initialization = Library::get(); + static void BM_CreateDestroyCpp(benchmark::State& state) { TrackCounters track_counters; while (state.KeepRunning()) { diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc index 964cd4c5da..95f19e7586 100644 --- a/test/cpp/microbenchmarks/bm_error.cc +++ b/test/cpp/microbenchmarks/bm_error.cc @@ -43,6 +43,8 @@ extern "C" { #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" +auto& force_library_initialization = Library::get(); + class ErrorDeleter { public: void operator()(grpc_error* error) { GRPC_ERROR_UNREF(error); } diff --git a/test/cpp/microbenchmarks/bm_metadata.cc b/test/cpp/microbenchmarks/bm_metadata.cc index f3b2190af6..07c55f42e9 100644 --- a/test/cpp/microbenchmarks/bm_metadata.cc +++ b/test/cpp/microbenchmarks/bm_metadata.cc @@ -43,6 +43,8 @@ extern "C" { #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" +auto& force_library_initialization = Library::get(); + static void BM_SliceFromStatic(benchmark::State& state) { TrackCounters track_counters; while (state.KeepRunning()) { |