aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-22 14:31:44 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-22 14:31:44 -0700
commit80ca516640c068f85e8523c50c74d8e790c7bd9c (patch)
treef1f37e9583dc6430628dd4030c814051f84e2506 /src
parent8222b19eb14273df8124cb5f46f629836e72f6ad (diff)
Return dummy data for empty histograms
Diffstat (limited to 'src')
-rw-r--r--src/core/support/histogram.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/support/histogram.c b/src/core/support/histogram.c
index 673affde71..d16ea6c3f7 100644
--- a/src/core/support/histogram.c
+++ b/src/core/support/histogram.c
@@ -164,7 +164,9 @@ static double threshold_for_count_below(gpr_histogram *h, double count_below) {
size_t lower_idx;
size_t upper_idx;
- GPR_ASSERT(h->count >= 1);
+ if (h->count == 0) {
+ return 0.0;
+ }
if (count_below <= 0) {
return h->min_seen;