哇!你是如何测量加载时间的?据我所知,nginx只报告请求响应时间($request_time),这是完全不同的.
我几个月没好好看,但上次检查时,几乎没有可用于分析响应时间. PastMon看起来很有希望.还有像Client Vantage这样的商业工具(相当昂贵).
我最终编写了自己的文件 – 创建一个简单的awk脚本来报告超过阈值的所有命中并不是那么难 – 但请记住,您需要返回并检查URL如何表现其余的时间.例如
# looking for URLs matching 'example.com/interesting'
# with URL in $6 and $request_time in $8
BEGIN {}
$6==/example.com\/interesting/ {
if ( $8>0.3) {
n[$6]+=1; # no of hits by URL
t[$6]+=$8; # sum of times by url
s[$6]+=$8 * $8; # sum of sq of times by url
if (m[$6]
}
}
END {
print "url, n, avg, stddev, max";
for (x in n) {
print x ", " n[x] ", " t[x]/n[x] ", " sqrt(s[x]-t[x]*t[x])/(n[x]-1) ", " m[x];
}
}
如果您正在测量代理上的响应时间,那么您还要测量通过网络传递请求所花费的时间 – 即您的应用程序可能表现一致,但是互联网/客户端上的更改会引入峰值.如果您想查看应用程序的实际功能,那么您需要查看您的Web服务器日志.