We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b8bd6a commit 1bfb35cCopy full SHA for 1bfb35c
include/pinba/histogram.h
@@ -166,13 +166,15 @@ struct histogram_t
166
else
167
{
168
uint32_t bucket_id = d.nsec / conf.bucket_d.nsec;
169
- assert((bucket_id > 0) && "zero bucket is checked above");
170
171
if (bucket_id < conf.bucket_count)
172
173
// try fit exact upper-bound match to previous bucket
174
- if (d == bucket_id * conf.bucket_d)
175
- bucket_id -= 1;
+ if (bucket_id > 0)
+ {
+ if (d == bucket_id * conf.bucket_d)
176
+ bucket_id -= 1;
177
+ }
178
179
map_[bucket_id] += increment_by;
180
}
0 commit comments