diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-04-23 07:58:19 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-04-23 07:58:19 -0700 |
commit | b372405cede07d64af90867d89ba95ae95d3dc05 (patch) | |
tree | 9fb68253c54eb7f527a2cf3cdfbbdaad0b6cbb4b /src/core | |
parent | e7bd03cdec8f4b9e878e5206c98f5e6fb5bc43f5 (diff) | |
parent | 6db722453fe10179c7a6cebfb6fe027caaae8381 (diff) |
Merge pull request #1328 from vjpai/clamp
Clamp histogram at 1.0 on low end to handle rare possibility of sub-1 entry (likely only for testing)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/support/histogram.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/support/histogram.c b/src/core/support/histogram.c index ed344b43e8..673affde71 100644 --- a/src/core/support/histogram.c +++ b/src/core/support/histogram.c @@ -76,7 +76,7 @@ static size_t bucket_for_unchecked(gpr_histogram *h, double x) { /* bounds checked version of the above */ static size_t bucket_for(gpr_histogram *h, double x) { - size_t bucket = bucket_for_unchecked(h, GPR_CLAMP(x, 0, h->max_possible)); + size_t bucket = bucket_for_unchecked(h, GPR_CLAMP(x, 1.0, h->max_possible)); GPR_ASSERT(bucket < h->num_buckets); return bucket; } |