Commit 1f33ba17 authored by beorn7's avatar beorn7

Emphasize the cumulative nature of a histogram.

Link the relevant Wikipedia entry.
parent 2a3cd113
...@@ -55,13 +55,15 @@ during a scrape: ...@@ -55,13 +55,15 @@ during a scrape:
* the **total sum** of all observed values, exposed as `<basename>_sum` * the **total sum** of all observed values, exposed as `<basename>_sum`
* the **count** of events that have been observed, exposed as `<basename>_count` (identical to `<basename>_bucket{le="+Inf"}` above) * the **count** of events that have been observed, exposed as `<basename>_count` (identical to `<basename>_bucket{le="+Inf"}` above)
Use the [`histogram_quantile()` Use the
function](/docs/querying/functions/#histogram_quantile) to calculate [`histogram_quantile()` function](/docs/querying/functions/#histogram_quantile)
quantiles from histograms or even aggregations of histograms. A to calculate quantiles from histograms or even aggregations of histograms. A
histogram is also suitable to calculate an [Apdex histogram is also suitable to calculate an
score](http://en.wikipedia.org/wiki/Apdex). See [histograms and [Apdex score](http://en.wikipedia.org/wiki/Apdex). When operating on buckets,
summaries](/docs/practices/histograms) for details of histogram usage remember that the histogram is
and differences to [summaries](#summary). [cumulative](https://en.wikipedia.org/wiki/Histogram#Cumulative_histogram). See
[histograms and summaries](/docs/practices/histograms) for details of histogram
usage and differences to [summaries](#summary).
Client library usage documentation for histograms: Client library usage documentation for histograms:
......
...@@ -80,8 +80,10 @@ following expression yields the Apdex score for each job over the last ...@@ -80,8 +80,10 @@ following expression yields the Apdex score for each job over the last
) / 2 / sum(rate(http_request_duration_seconds_count[5m])) by (job) ) / 2 / sum(rate(http_request_duration_seconds_count[5m])) by (job)
Note that we divide the sum of both buckets. The reason is that the histogram Note that we divide the sum of both buckets. The reason is that the histogram
buckets are cumulative. The `le="0.3"` bucket is also contained in the `le="1.2"` buckets are
bucket; dividing it by 2 corrects for that. [cumulative](https://en.wikipedia.org/wiki/Histogram#Cumulative_histogram). The
`le="0.3"` bucket is also contained in the `le="1.2"` bucket; dividing it by 2
corrects for that.
## Quantiles ## Quantiles
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment