|
|
|
|
@ -11,6 +11,9 @@ eval instant at 5m histogram_count(empty_histogram) |
|
|
|
|
eval instant at 5m histogram_sum(empty_histogram) |
|
|
|
|
{} 0 |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_avg(empty_histogram) |
|
|
|
|
{} NaN |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_fraction(-Inf, +Inf, empty_histogram) |
|
|
|
|
{} NaN |
|
|
|
|
|
|
|
|
|
@ -31,6 +34,10 @@ eval instant at 5m histogram_count(single_histogram) |
|
|
|
|
eval instant at 5m histogram_sum(single_histogram) |
|
|
|
|
{} 5 |
|
|
|
|
|
|
|
|
|
# histogram_avg calculates the average from sum and count properties. |
|
|
|
|
eval instant at 5m histogram_avg(single_histogram) |
|
|
|
|
{} 1.25 |
|
|
|
|
|
|
|
|
|
# We expect half of the values to fall in the range 1 < x <= 2. |
|
|
|
|
eval instant at 5m histogram_fraction(1, 2, single_histogram) |
|
|
|
|
{} 0.5 |
|
|
|
|
@ -55,6 +62,9 @@ eval instant at 5m histogram_count(multi_histogram) |
|
|
|
|
eval instant at 5m histogram_sum(multi_histogram) |
|
|
|
|
{} 5 |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_avg(multi_histogram) |
|
|
|
|
{} 1.25 |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_fraction(1, 2, multi_histogram) |
|
|
|
|
{} 0.5 |
|
|
|
|
|
|
|
|
|
@ -69,6 +79,9 @@ eval instant at 50m histogram_count(multi_histogram) |
|
|
|
|
eval instant at 50m histogram_sum(multi_histogram) |
|
|
|
|
{} 5 |
|
|
|
|
|
|
|
|
|
eval instant at 50m histogram_avg(multi_histogram) |
|
|
|
|
{} 1.25 |
|
|
|
|
|
|
|
|
|
eval instant at 50m histogram_fraction(1, 2, multi_histogram) |
|
|
|
|
{} 0.5 |
|
|
|
|
|
|
|
|
|
@ -89,6 +102,9 @@ eval instant at 5m histogram_count(incr_histogram) |
|
|
|
|
eval instant at 5m histogram_sum(incr_histogram) |
|
|
|
|
{} 6 |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_avg(incr_histogram) |
|
|
|
|
{} 1.2 |
|
|
|
|
|
|
|
|
|
# We expect 3/5ths of the values to fall in the range 1 < x <= 2. |
|
|
|
|
eval instant at 5m histogram_fraction(1, 2, incr_histogram) |
|
|
|
|
{} 0.6 |
|
|
|
|
@ -106,6 +122,9 @@ eval instant at 50m histogram_count(incr_histogram) |
|
|
|
|
eval instant at 50m histogram_sum(incr_histogram) |
|
|
|
|
{} 24 |
|
|
|
|
|
|
|
|
|
eval instant at 50m histogram_avg(incr_histogram) |
|
|
|
|
{} 1.7142857142857142 |
|
|
|
|
|
|
|
|
|
# We expect 12/14ths of the values to fall in the range 1 < x <= 2. |
|
|
|
|
eval instant at 50m histogram_fraction(1, 2, incr_histogram) |
|
|
|
|
{} 0.8571428571428571 |
|
|
|
|
@ -140,6 +159,9 @@ eval instant at 5m histogram_count(low_res_histogram) |
|
|
|
|
eval instant at 5m histogram_sum(low_res_histogram) |
|
|
|
|
{} 8 |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_avg(low_res_histogram) |
|
|
|
|
{} 1.6 |
|
|
|
|
|
|
|
|
|
# We expect all values to fall into the lower-resolution bucket with the range 1 < x <= 4. |
|
|
|
|
eval instant at 5m histogram_fraction(1, 4, low_res_histogram) |
|
|
|
|
{} 1 |
|
|
|
|
@ -157,6 +179,9 @@ eval instant at 5m histogram_count(single_zero_histogram) |
|
|
|
|
eval instant at 5m histogram_sum(single_zero_histogram) |
|
|
|
|
{} 0.25 |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_avg(single_zero_histogram) |
|
|
|
|
{} 0.25 |
|
|
|
|
|
|
|
|
|
# When only the zero bucket is populated, or there are negative buckets, the distribution is assumed to be equally |
|
|
|
|
# distributed around zero; i.e. that there are an equal number of positive and negative observations. Therefore the |
|
|
|
|
# entire distribution must lie within the full range of the zero bucket, in this case: -0.5 < x <= +0.5. |
|
|
|
|
@ -179,6 +204,9 @@ eval instant at 5m histogram_count(negative_histogram) |
|
|
|
|
eval instant at 5m histogram_sum(negative_histogram) |
|
|
|
|
{} -5 |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_avg(negative_histogram) |
|
|
|
|
{} -1.25 |
|
|
|
|
|
|
|
|
|
# We expect half of the values to fall in the range -2 < x <= -1. |
|
|
|
|
eval instant at 5m histogram_fraction(-2, -1, negative_histogram) |
|
|
|
|
{} 0.5 |
|
|
|
|
@ -199,6 +227,9 @@ eval instant at 10m histogram_count(two_samples_histogram) |
|
|
|
|
eval instant at 10m histogram_sum(two_samples_histogram) |
|
|
|
|
{} -4 |
|
|
|
|
|
|
|
|
|
eval instant at 10m histogram_avg(two_samples_histogram) |
|
|
|
|
{} -1 |
|
|
|
|
|
|
|
|
|
eval instant at 10m histogram_fraction(-2, -1, two_samples_histogram) |
|
|
|
|
{} 0.5 |
|
|
|
|
|
|
|
|
|
@ -217,6 +248,9 @@ eval instant at 5m histogram_count(balanced_histogram) |
|
|
|
|
eval instant at 5m histogram_sum(balanced_histogram) |
|
|
|
|
{} 0 |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_avg(balanced_histogram) |
|
|
|
|
{} 0 |
|
|
|
|
|
|
|
|
|
eval instant at 5m histogram_fraction(0, 4, balanced_histogram) |
|
|
|
|
{} 0.5 |
|
|
|
|
|
|
|
|
|
|