Explanation of Apdex calculation #2304
Replies: 2 comments 1 reply
-
Since this question has come up several times before, I'll try to give a comprehensive explanation here. The original formula for the Apdex score according to Wikipedia is:
As you can see, the translation of Now we can construct the full humungus Apdex query, in canonical formatting:
Of course, we can use normal algebraic operations to simplify the query. First we can push the
Now it's easy to dissolve the
Since
Now we can pull the
Multiplying by 0.5 is the same as dividing by 2, so we can also write:
Which is precisely the query from the docs, just with different indentation and line breaks. |
Beta Was this translation helpful? Give feedback.
-
Thanks! I am wondering if we should add this to the docs, or make a footnote. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/prometheus/docs/blob/main/content/docs/practices/histograms.md?plain=1#L93
The docs currently say:
This doesn't make sense - dividing by 2 has nothing to do with whether the histogram buckets are cumulative. Rather it looks like the 1/2 factor is meant as the weight of "tolerable" instances in the Apdex score. To correct for the fact that the le=1.2 bucket contains the le=0.3 bucket, you need to instead subtract the latter from the former.
Beta Was this translation helpful? Give feedback.
All reactions