diff options
author | 2017-03-30 13:20:00 -0700 | |
---|---|---|
committer | 2017-03-30 13:20:00 -0700 | |
commit | e04906dc54e95f16bea7146459dfc1ab599b3826 (patch) | |
tree | 00d308fc6b431548a23e1a619ea6d77187f7dde0 /test/cpp/microbenchmarks/bm_cq.cc | |
parent | 359ffd83e01e236edd8d96b8ff7e9c326354c6fb (diff) | |
parent | bea49665d418b69597b6bc058dd78744c0fa494d (diff) |
Merge branch 'master' into cq_create_api_changes
Diffstat (limited to 'test/cpp/microbenchmarks/bm_cq.cc')
-rw-r--r-- | test/cpp/microbenchmarks/bm_cq.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index eaba7d858c..6f153f77f5 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -34,12 +34,11 @@ /* This benchmark exists to ensure that the benchmark integration is * working */ +#include <benchmark/benchmark.h> #include <grpc++/completion_queue.h> #include <grpc++/impl/grpc_library.h> #include <grpc/grpc.h> - #include "test/cpp/microbenchmarks/helpers.h" -#include "third_party/benchmark/include/benchmark/benchmark.h" extern "C" { #include "src/core/lib/surface/completion_queue.h" @@ -59,6 +58,17 @@ static void BM_CreateDestroyCpp(benchmark::State& state) { } BENCHMARK(BM_CreateDestroyCpp); +/* Create cq using a different constructor */ +static void BM_CreateDestroyCpp2(benchmark::State& state) { + TrackCounters track_counters; + while (state.KeepRunning()) { + grpc_completion_queue* core_cq = grpc_completion_queue_create(NULL); + CompletionQueue cq(core_cq); + } + track_counters.Finish(state); +} +BENCHMARK(BM_CreateDestroyCpp2); + static void BM_CreateDestroyCore(benchmark::State& state) { TrackCounters track_counters; while (state.KeepRunning()) { |