()
| 164 | } |
| 165 | |
| 166 | func (h Histogram) BucketCount() int { |
| 167 | count := 0 |
| 168 | if h.IsFloatHistogram() { |
| 169 | count = len(h.PositiveCounts) + len(h.NegativeCounts) |
| 170 | if h.GetZeroCountFloat() > 0 { |
| 171 | count++ |
| 172 | } |
| 173 | } else { |
| 174 | count = len(h.PositiveDeltas) + len(h.NegativeDeltas) |
| 175 | if h.GetZeroCountInt() > 0 { |
| 176 | count++ |
| 177 | } |
| 178 | } |
| 179 | return count |
| 180 | } |
| 181 | |
| 182 | // MaxWrappedHistogramSizeBytes is the maximum allowed size of a single native histogram in raw protobuf |
| 183 | // bytes before unmarshalling. A value of 0 disables the limit. |
no test coverage detected