TP=Top Percentile,Top百分數,是一個統計學里的術語,與平均數、中位數都是一類。
TP50、TP90和TP99等指標常用於系統性能監控場景,指高於50%、90%、99%等百分線的情況。
首先給出Google到的答案:
The tp90 is a minimum time under which 90% of requests have been served.
tp90 = top percentile 90
Imagine you have response times:
10s
1000s
100s
2s
Calculating TP is very simple:
1. Sort all times in ascending order: [2s, 10s, 100s, 1000s]
2. find latest item in portion you need to calculate.
2.1 For TP50 it will be ceil(4*0.5) = 2 requests. You need 2nd request.
2.2 For TP90 it will be ceil(4*0.9) = 4. You need 4th request.
3. We get time for the item found above. TP50=10s. TP90=1000s
依此,翻譯過來,TP99就是滿足百分之九十九的網絡請求所需要的最低耗時。同理TP999就是滿足千分之九百九十九的網絡請求所需要的最低耗時。
舉個例子:有四次請求耗時分別為:
10ms,1000ms,100ms,2ms
那么我們可以這樣計算TP99:4次請求中,99%的請求數為4*0.99,進位取整也就是4次,滿足這全部4次請求的的最低耗時為1000ms,也就是TP99的答案是1000ms。
(可以認為 TP90的意思是保證90%請求都能被響應的最小耗時。) 原文地址:https://blog.csdn.net/iteye_19209/article/details/82678064