diff options
author | Sree Kuchibhotla <sreek@google.com> | 2017-03-29 10:58:21 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2017-03-29 10:58:21 -0700 |
commit | 8dbd9677ef2a2b7b23a864366e37c7856a89a2ca (patch) | |
tree | eb2d8a3991120c24b86761096d76e25ff9470e82 /test/cpp | |
parent | 5c0ef3667961be2a3d09f1c019fd6cef2777dcd9 (diff) |
Add a benchmark
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/microbenchmarks/bm_cq.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 91e6a85101..55eec84b3b 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -59,6 +59,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()) { |