aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/bm_error.cc
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2017-03-09 10:32:09 -0800
committerGravatar ncteisen <ncteisen@gmail.com>2017-03-09 10:54:07 -0800
commita3e5801e2ef90988074cd6c1b74fb7d876f09533 (patch)
tree9f249eeaaafa06c5b18ab65171d7a221cdd34dd5 /test/cpp/microbenchmarks/bm_error.cc
parenta885d00a3843e13ed234f8a13c58a7ff9de4b397 (diff)
s/realloc/gpr_realloc to fix mem bug
Diffstat (limited to 'test/cpp/microbenchmarks/bm_error.cc')
-rw-r--r--test/cpp/microbenchmarks/bm_error.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc
index 6331b24592..76f168b75b 100644
--- a/test/cpp/microbenchmarks/bm_error.cc
+++ b/test/cpp/microbenchmarks/bm_error.cc
@@ -72,12 +72,14 @@ static void BM_ErrorCreateAndSetStatus(benchmark::State& state) {
BENCHMARK(BM_ErrorCreateAndSetStatus);
static void BM_ErrorCreateAndSetIntAndStr(benchmark::State& state) {
+ TrackCounters track_counters;
while (state.KeepRunning()) {
GRPC_ERROR_UNREF(grpc_error_set_str(
grpc_error_set_int(GRPC_ERROR_CREATE("GOAWAY received"),
GRPC_ERROR_INT_HTTP2_ERROR, (intptr_t)0),
GRPC_ERROR_STR_RAW_BYTES, "raw bytes"));
}
+ track_counters.Finish(state);
}
BENCHMARK(BM_ErrorCreateAndSetIntAndStr);