Apdex 全称是 Application Performance Index,是由 Apdex 联盟开放的用于评估应用性能的工业标准。Apdex 联盟起源于 2004 年,由 Peter Sevcik发起。Apdex 标准从用户的角度出发,将对应用响应时间的表现,转为用户对于应用性能的可量化为范围为 0-1 的满意度评价。1的评价最好
Apdex 定义了应用响应时间的最优门槛为 T,另外根据应用响应时间结合 T 定义了三种不同的性能表现:
- Satisfied(满意):应用响应时间低于或等于 T(T 由性能评估人员根据预期性能要求确定),比如 T 为 1.5s,则一个耗时 1s 的响应结果则可以认为是 satisfied 的。
- Tolerating(可容忍):应用响应时间大于 T,但同时小于或等于 4T。假设应用设定的 T 值为 1s,则 4 * 1 = 4 秒极为应用响应时间的容忍上限。
- Frustrated(烦躁期):应用响应时间大于 4T。
Proponents of the Apdex standard believe that it offers a better way to measure what matters. The Apdex method converts many measurements into one number on a uniform scale of 0-to-1 (0 = no users satisfied, 1 = all users satisfied). The resulting Apdex score is a numerical measure of user satisfaction with the performance of enterprise applications. This metric can be used to report on any source of end-user performance measurements for which a performance objective has been defined.
The Apdex formula is the number of satisfied samples plus half of the tolerating samples plus none of the frustrated samples, divided by all the samples:
where the sub-script t is the target time, and the tolerable time is assumed to be 4 times the target time. So it is easy to see how this ratio is always directly related to users' perceptions of satisfactory application responsiveness.
Example: if there are 100 samples with a target time of 3 seconds, where 60 are below 3 seconds, 30 are between 3 and 12 seconds, and the remaining 10 are above 12 seconds, the Apdex score is:
jmeter的设置jmeter.properties.默认值:500ms以下为满足值,1500ms为容忍值
参考:
1、https://ruby-china.org/topics/27121
2、https://en.wikipedia.org/wiki/Apdex