diff options
author | 2018-08-28 12:53:57 -0700 | |
---|---|---|
committer | 2018-08-28 12:53:57 -0700 | |
commit | 4b5b019d5644affef122e06c6898811286850b8d (patch) | |
tree | 73c601dc31c436e3d800a846d08b9ace7ff05235 /test/cpp/qps/histogram.h | |
parent | b8f030bc0b507903e9d156fb44d161015273d0c6 (diff) | |
parent | ee65a5eaee45a765d1d4176a797bb8288faeb180 (diff) |
Merge branch 'master' of https://github.com/grpc/grpc into channelz-subchannels
Diffstat (limited to 'test/cpp/qps/histogram.h')
-rw-r--r-- | test/cpp/qps/histogram.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/cpp/qps/histogram.h b/test/cpp/qps/histogram.h index ba72b5b332..6275128f34 100644 --- a/test/cpp/qps/histogram.h +++ b/test/cpp/qps/histogram.h @@ -34,6 +34,11 @@ class Histogram { ~Histogram() { if (impl_) grpc_histogram_destroy(impl_); } + void Reset() { + if (impl_) grpc_histogram_destroy(impl_); + impl_ = grpc_histogram_create(default_resolution(), default_max_possible()); + } + Histogram(Histogram&& other) : impl_(other.impl_) { other.impl_ = nullptr; } void Merge(const Histogram& h) { grpc_histogram_merge(impl_, h.impl_); } |