web頁(yè)面與javawebsocket接口的壓力測(cè)試_第1頁(yè)
web頁(yè)面與javawebsocket接口的壓力測(cè)試_第2頁(yè)
web頁(yè)面與javawebsocket接口的壓力測(cè)試_第3頁(yè)
web頁(yè)面與javawebsocket接口的壓力測(cè)試_第4頁(yè)
web頁(yè)面與javawebsocket接口的壓力測(cè)試_第5頁(yè)
已閱讀5頁(yè),還剩4頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

web頁(yè)面與javawebsocket接口的

壓力測(cè)試

對(duì)于網(wǎng)站開(kāi)發(fā),壓力測(cè)試是少不了的。壓力測(cè)試可以對(duì)網(wǎng)絡(luò),服務(wù)器,

系統(tǒng)架構(gòu)的優(yōu)化程度進(jìn)行檢驗(yàn)。以便提前知道網(wǎng)站的負(fù)載能力,并未

優(yōu)化提供依據(jù)飛

對(duì)于網(wǎng)站的壓力測(cè)試,基本離不開(kāi)下面兩點(diǎn)的測(cè)試:W一b頁(yè)面訪問(wèn)的

壓力測(cè)試和java接口的壓力測(cè)試(我們接口是通過(guò)websocket實(shí)

現(xiàn))。

web頁(yè)面訪問(wèn)壓力測(cè)試工具可以使用apache自帶的ab命令進(jìn)行檢

測(cè);javawebsocket接口的壓力測(cè)試可以使用

Jmeter+websocket插件進(jìn)行檢測(cè)。

ab安裝與使用

一、下載軟件

下載地址:

二、進(jìn)入軟件路徑

把下載的文件解壓到后,用cmd指令進(jìn)入〃文件夾路徑

/Apache24/bin,z

三、獲取ab指令參數(shù)列表

執(zhí)行''abhelpz,

Optionsare:

-nrequestsNumberofrequeststoperform

-cconcurrencyNumberofmultiplerequeststo

makeatatime

-ttimelimitSecondstomax.tospendon

benchmarking

Thisimplies-n50000

-stimeoutSecondstomax.waitforeach

response

Defaultisseconds

-bwindowsizeSizeofTCPsend/receivebuffer

inbytes

-BaddressAddresstobindtowhenmaking

outgoingconnections

-ppostfileFilecontainingdatatoPOST.

Rememberalsotoset-T

-uputfileFilecontainingdatatoPUT.

Rememberalsotoset-T

-Tcontent-typeContent-typeheadertousefor

POST/PUTdata,eg.

'app1ication/x-www-form-urlencoded,

Defaultis1text/plain,

-vverbosityHowmuchtroubleshootinginfo

toprint

-wPrintoutresultsinHTML

tables

-iUseHEADinsteadofGET

-xattributesStringtoinsertastable

attributes

-yattributesStringtoinsertastr

attributes

-zattributesStringtoinsertastdorth

attributes

-CattributeAddcookie,eg.1Apache=12341.

(repeatable)

-HattributeAddArbitraryheaderline,eg.

'Accept-Encoding:gzip,

Insertedafterallnormal

headerlines.(repeatable)

-AattributeAddBasicWWWAuthentication,

theattributes

areacolonseparatedusername

andpassword.

-PattributeAddBasicProxyAuthentication,

theattributes

areacolonseparatedusername

andpassword.

-Xproxy:portProxyserverandportnumberto

use

-VPrintversionnumberandexit

-kUseHTTPKeepAlivefeature

-dDonotshowpercentilesserved

table.

-SDonotshowconfidence

estimatorsandwarnings.

-qDonotshowprogresswhendoing

morethanI50requests

-1Acceptvariabledocument

length(usethisfordynamicpages)

-gfilenameOutputcollecteddatato

gnuplotformatfile.

-efilenameOutputCSVfilewith

percentagesserved

-rDonTtexitonsocketreceive

errors.

-mmethodMethodname

-hDisplayusageinformation

(thismessage)

質(zhì)、進(jìn)行web壓力測(cè)試

執(zhí)行、'ab-n1000-c

100〃

五、報(bào)表結(jié)果

ServerSottware:Apache/2.4./Server

Hostname:ServerPort:

80

DocumentPath:/index.htmlDocument

Length:16300bytes

ConcurrencyLevel:lOOTimetakenfortests:

26.93:secondsCompleterequests:lOOCFailed

requests:CTotaltransferred:

165,';3000bytes

HTMLtransferred:1630000CbytesRequestsper

second:37.13[#/sec](mean)Timeperrequest:

93.147[ms](mean)Timeperrequest:26.931

[ms](mean,acrossallconcurrentrequests)Transfer

rate:60C.95[Kbytes/sec]received

ConnectionTimes(ms)

minmean[+/-sd]median

maxConnect:9279.1

SIProcessing:二;:2532466.3

2740Waiting:271325769.3

2649Total:802559466.126872776

Percentageoftherequestsservedwithinacertain

time(ms)

50%2687

66%2704

75%2714

80%2718

90%2730

95%2739

98%2749

99%2754

100%(longestrequest)

Jmeter安裝與使用

一、下載

下載地址:

二、安裝

解壓文件夾,然后進(jìn)入''apache-jmeter-2.13/bin/,z

雙擊''jmeter.bat〃啟動(dòng)軟件

三、安裝websokcet插件

Websocket插件下載:

把jar包復(fù)制到''jme七er安裝路徑/lib/ext/〃

關(guān)閉jmeter再啟動(dòng)

!1!使用

a)添

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論