aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/bm_cq.cc
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreecha@users.noreply.github.com>2017-03-30 13:17:32 -0700
committerGravatar GitHub <noreply@github.com>2017-03-30 13:17:32 -0700
commitbea49665d418b69597b6bc058dd78744c0fa494d (patch)
treea74ea621249521ef32e285d574c4c76eff89c367 /test/cpp/microbenchmarks/bm_cq.cc
parentf823f9d46e022f6bfbb3db670befc91849e5a976 (diff)
parent8dbd9677ef2a2b7b23a864366e37c7856a89a2ca (diff)
Merge pull request #10348 from sreecha/init-free-cq
Do not call grpc_init() for per-call-completion-queues created by a C++ sync server
Diffstat (limited to 'test/cpp/microbenchmarks/bm_cq.cc')
-rw-r--r--test/cpp/microbenchmarks/bm_cq.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc
index 676695b63c..38ac9d2705 100644
--- a/test/cpp/microbenchmarks/bm_cq.cc
+++ b/test/cpp/microbenchmarks/bm_cq.cc
@@ -58,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()) {