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,測(cè)試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便在當(dāng)前目錄下生成了!然后根據(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,測(cè)試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便在當(dāng)前目錄下生成了!然后根據(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 ==>驗(yàn)證是否有該字體!
- #save file to png file
- set output "keepalive.png" ///輸出圖片文件名
- #graph title
- set title "Lin-credibe" ///圖片標(biāo)題
- #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
本文出自:億恩科技【www.allwellnessguide.com】
服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|