【网站页面速度测试工具(网页性能优化)】
该系列工具主要用于测试网页加载速度,以了解页面速度瓶颈,方便对页面进行优化。
推荐的测试工具
Mozilla Firefox + Firebug + Yahoo! YSlowYSlow: http://developer.yahoo.com/yslow/
返回测试结果并根据YSlow rules建议优化策略。另:YSlow包含的图片无损减肥工具smushit:http://developer.yahoo.com/yslow/smushit/非常有用。
Mozilla Firefox + Firebug + Google Page Speedhttp://code.google.com/speed/page-speed/
Google Chrome + Google Speed Tracerhttp://code.google.com/webtoolkit/speedtracer/
Mozilla Firefox + Firebug + Hammerheadhttp://stevesouders.com/hammerhead/
其他在线测试工具(有些支持从不同地理位置测试):
Pingdom WebPagetest Gomez Instant Test Pro Resource Expert Droid Web Caching Tests Port80 Compression Check A simple online web page compression / deflate / gzip test tool Web Page Analyzer【网站服务器性能压力测试工具(stress/performance testing for web server)】
该系列工具主要用于测试Web服务器的负载能力,以了解当前Web服务器在高并发高负载情况下的响应状况和速度,方便对Web服务器进行优化和重构。
测试指标
指定并发用户数(how many clients)(有些还包括requests/client),并运行指定时间长度,获得测试结果:
requests/second : 每秒钟所能处理的请求数; milliseconds/request : 平均每个请求需要的时间; bytes/second :每秒钟处理的字节数;常用的压力测试工具
ApacheBench(ab)和Apache HTTP Server一起安装的(例如Ubuntu下安装成功位于/usr/bin/ab),使用参考:http://httpd.apache.org/docs/2.2/programs/ab.html,可以用来测试任何web server。
使用实例:
ab -c 100 -n 2 -t 10 http://54min.com/index.php (-c 并发数;-n 每个client的请求次数;-t 运行时间;)
更多参数可以参考如上介绍,ab功能较为强大。
webbenchhttp://freshmeat.net/projects/web-bench/;使用可以参考:http://blog.s135.com/post/288/
例如:webbench -c 500 -t 10 http://54min.com/index.php (-c表示并发数,-t表示时间(秒)),测试结果:
Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://54min.com/index.php
500 clients, running 10 sec.
Speed=84 pages/min, 348 bytes/sec.
Requests: 14 susceed, 0 failed.
更多的压力测试工具