【测试工具】二、ab压力测试及结果分析
生活随笔
收集整理的這篇文章主要介紹了
【测试工具】二、ab压力测试及结果分析
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
官方下載地址:https://www.apachehaus.com/cgi-bin/download.plx
壓力測(cè)試
D:\Users\zhiqiangzhou\Desktop\ab>ab -n 10000 -c 100 http://localhost:8281/tomcat /getTestStr This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 1997-2005 The Apache Software Foundation, http://www.apache.org/Benchmarking localhost (be patient) Completed 1000 requests Completed 2000 requests Completed 3000 requests Completed 4000 requests Completed 5000 requests Completed 6000 requests Completed 7000 requests Completed 8000 requests Completed 9000 requests Finished 10000 requestsServer Software: Server Hostname: localhost Server Port: 8281Document Path: /tomcat/getTestStr Document Length: 9 bytesConcurrency Level: 100 Time taken for tests: 6.117388 seconds Complete requests: 10000 Failed requests: 0 Write errors: 0 Total transferred: 1410000 bytes HTML transferred: 90000 bytes Requests per second: 1634.68 [#/sec] (mean) Time per request: 61.174 [ms] (mean) Time per request: 0.612 [ms] (mean, across all concurrent requests) Transfer rate: 224.93 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max Connect: 0 0 0.4 0 12 Processing: 49 59 36.2 51 446 Waiting: 49 58 30.0 50 346 Total: 49 59 36.2 51 446Percentage of the requests served within a certain time (ms)50% 5166% 5275% 5480% 5790% 6995% 9098% 17799% 301100% 446 (longest request)結(jié)果分析
##-n 表示請(qǐng)求數(shù),-c 表示并發(fā)數(shù). D:\Users\zhiqiangzhou\Desktop\ab>ab -n 10000 -c 100 http://localhost:8281/tomcat /getTestStr This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright 1997-2005 The Apache Software Foundation, http://www.apache.org/Benchmarking localhost (be patient) Completed 1000 requests Completed 2000 requests Completed 3000 requests Completed 4000 requests Completed 5000 requests Completed 6000 requests Completed 7000 requests Completed 8000 requests Completed 9000 requests Finished 10000 requests##服務(wù)器軟件和版本 Server Software: ##請(qǐng)求的地址/域名 Server Hostname: localhost ##端口 Server Port: 8281##請(qǐng)求的路徑 Document Path: /tomcat/getTestStr ##頁面數(shù)據(jù)/返回的數(shù)據(jù)量 Document Length: 9 bytes##并發(fā)數(shù) Concurrency Level: 100 ##共使用了多少時(shí)間 Time taken for tests: 6.117388 seconds ##請(qǐng)求數(shù) Complete requests: 10000 ##失敗請(qǐng)求 Failed requests: 0 Write errors: 0 ##總共傳輸字節(jié)數(shù),包含http的頭信息等 Total transferred: 1410000 bytes ##html字節(jié)數(shù),實(shí)際的頁面?zhèn)鬟f字節(jié)數(shù) HTML transferred: 90000 bytes ##每秒多少請(qǐng)求,這個(gè)是非常重要的參數(shù)數(shù)值,服務(wù)器的吞吐量 Requests per second: 1634.68 [#/sec] (mean) ##用戶平均請(qǐng)求等待時(shí)間 Time per request: 61.174 [ms] (mean) ##服務(wù)器平均處理時(shí)間,也就是服務(wù)器吞吐量的倒數(shù) Time per request: 0.612 [ms] (mean, across all concurrent requests)##每秒獲取的數(shù)據(jù)長(zhǎng)度 Transfer rate: 224.93 [Kbytes/sec] receivedConnection Times (ms)min mean[+/-sd] median max ##連接的最小時(shí)間,平均值,標(biāo)準(zhǔn)差,中值,最大值 Connect: 0 0 0.4 0 12 ##處理時(shí)間 Processing: 49 59 36.2 51 446 ##等待時(shí)間 Waiting: 49 58 30.0 50 346 ##合計(jì)時(shí)間 Total: 49 59 36.2 51 446Percentage of the requests served within a certain time (ms)## 50%的請(qǐng)求在51ms內(nèi)返回 50% 51## 66%的請(qǐng)求在52ms內(nèi)返回66% 5275% 5480% 5790% 6995% 9098% 17799% 301100% 446 (longest request)總結(jié)
以上是生活随笔為你收集整理的【测试工具】二、ab压力测试及结果分析的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Oculus 原创始人帕胖:我打造了一款
- 下一篇: 关于硬件工程师的真相:这行真的不行吗,敢