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,總并發(fā)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
- ///執(zhí)行完之后,圖片keepalive.png便在當前目錄下生成了!然后根據(jù)圖分析!
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,總并發(fā)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
///執(zhí)行完之后,圖片keepalive.png便在當前目錄下生成了!然后根據(jù)圖分析!
--------------------------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
本文出自:億恩科技【mszdt.com】
服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]
|