(t *testing.T)
| 3238 | } |
| 3239 | |
| 3240 | func TestAllFloatBucketIterator(t *testing.T) { |
| 3241 | cases := []struct { |
| 3242 | h FloatHistogram |
| 3243 | // To determine the expected buckets. |
| 3244 | includeNeg, includeZero, includePos bool |
| 3245 | }{ |
| 3246 | { |
| 3247 | h: FloatHistogram{ |
| 3248 | Count: 405, |
| 3249 | ZeroCount: 102, |
| 3250 | ZeroThreshold: 0.001, |
| 3251 | Sum: 1008.4, |
| 3252 | Schema: 1, |
| 3253 | PositiveSpans: []Span{ |
| 3254 | {Offset: 0, Length: 4}, |
| 3255 | {Offset: 1, Length: 0}, |
| 3256 | {Offset: 3, Length: 3}, |
| 3257 | {Offset: 3, Length: 0}, |
| 3258 | {Offset: 2, Length: 0}, |
| 3259 | {Offset: 5, Length: 3}, |
| 3260 | }, |
| 3261 | PositiveBuckets: []float64{100, 344, 123, 55, 3, 63, 2, 54, 235, 33}, |
| 3262 | NegativeSpans: []Span{ |
| 3263 | {Offset: 0, Length: 3}, |
| 3264 | {Offset: 1, Length: 0}, |
| 3265 | {Offset: 3, Length: 0}, |
| 3266 | {Offset: 3, Length: 4}, |
| 3267 | {Offset: 2, Length: 0}, |
| 3268 | {Offset: 5, Length: 3}, |
| 3269 | }, |
| 3270 | NegativeBuckets: []float64{10, 34, 1230, 54, 67, 63, 2, 554, 235, 33}, |
| 3271 | }, |
| 3272 | includeNeg: true, |
| 3273 | includeZero: true, |
| 3274 | includePos: true, |
| 3275 | }, |
| 3276 | { |
| 3277 | h: FloatHistogram{ |
| 3278 | Count: 405, |
| 3279 | ZeroCount: 102, |
| 3280 | ZeroThreshold: 0.001, |
| 3281 | Sum: 1008.4, |
| 3282 | Schema: 1, |
| 3283 | NegativeSpans: []Span{ |
| 3284 | {Offset: 0, Length: 3}, |
| 3285 | {Offset: 1, Length: 0}, |
| 3286 | {Offset: 3, Length: 0}, |
| 3287 | {Offset: 3, Length: 4}, |
| 3288 | {Offset: 2, Length: 0}, |
| 3289 | {Offset: 5, Length: 3}, |
| 3290 | }, |
| 3291 | NegativeBuckets: []float64{10, 34, 1230, 54, 67, 63, 2, 554, 235, 33}, |
| 3292 | }, |
| 3293 | includeNeg: true, |
| 3294 | includeZero: true, |
| 3295 | includePos: false, |
| 3296 | }, |
| 3297 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…