apache压力测试工具ab

files----> keep.data  nokeep.data  keepalive.output

shell> yum install -y gnuplot         ///gnuplot--->画图软件!
shell> ab -k -g /tmp/test/keep.data -n 10000 -c 10000 http://10.1.1.235/template3/index.html
                                                             ///keepalive on,总并发10000,测试10000次!
shell> ab -g /tmp/test/nokeep.data -n 10000 -c 10000 http://10.1.1.235/template3/index.html
                                                            ///keepalive off
shell> cd /tmp/test
keep.data  nokeep.data  keepalive.output
shell> gnuplot keepalive.output
                            ///执行完之后,图片keepalive.png便在当前目录下生成了!然后根据图分析!

 

--------------------------keepalive.output---------------------------------------

#output as png image         
set term png enhanced font '/usr/share/fonts/liberation/LiberationSans-Regular.ttf'   
# ls /usr/share/fonts/liberation/LiberationSans-Regular.ttf ==>验证是否有该字体!
#save file to  png file
set output "keepalive.png"           ///输出图片文件名
#graph title
set title "Lin-credibe"		///图片标题
#nicer aspect ratio for image size
set size 1,0.7
# y-axis grid
set grid y
# x-axis label
set xlabel "request"
#y-axis label
set ylabel "response time (ms)"
plot "keep.data" using 9 smooth sbezier with lines title "usingKeepAlive", 
"nokeep.data" using 9 smooth sbezier with lines title "noKeepAlive"    //no white space

 

生成的图片如下:


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值