Skip to content

Explanation of Apdex calculation #2304

Answered by beorn7
tdb-alcorn asked this question in Q&A
Discussion options

You must be logged in to vote

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:

        SatisfiedCount + (0.5 * ToleratingCount) + (0 * FrustratedCount)
Apdex = ----------------------------------------------------------------
                                  TotalSamples

FrustratedCount is multiplied away, so we don't need to query it in PromQL. Directly translating all the other components into PromQL yields the following, using the thresholds from the example (300ms target, 1.2s tolerated):

  • SatisfiedCountsum(rate(http_request_duration_seconds_bucket{le="0.3"}[5m])) by (job)
  • ToleratingCount

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by tdb-alcorn
Comment options

You must be logged in to vote
3 replies
@beorn7
Comment options

@tmcheung
Comment options

@beorn7
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #2301 on March 27, 2023 15:37.