Use of stress testing tool ab

 

 jmeter to test the interface.

 

Install apache server:

Download httpd:

http://apache.fayea.com/

 

wget http://apache.fayea.com/httpd/httpd-2.2.31.tar.gz

2 Unzip 

 

3 Configuration 

./configure --prefix=/usr/local/apache2 --enable-rewrite --enable-so --enable-headers --enable-expires --with-mpm=worker --enable-modules=most --enable-deflate

--prefix=/usr/local/apache2 means to specify the installation path of apache, the default installation path is /usr/local/apache2

--enable-rewrite provides a more tender rewrite of URL rules, that is, converts to other desired URL addresses based on known URL addresses

--enable-so activates the DSO (Dynamic Shared Objects) of the apache service, that is, the shared module can be compiled and installed in the DSO mode in the future, but the module itself cannot be compiled in the DSO mode.

--enable-headers provides to allow control over HTTP request headers.

--enable-expires activates Xun Yu to control the HTTP "Expires:" and "Cache-Control:" header content through the configuration file, that is, for website pictures, j

 

4 Compile and install 

make 

make install 

 

5 Under the installation directory /usr/local/apache2/bin 

Execute ab -n1000 -c10 www.baidu.com to send 1000 requests and the concurrency is 10 

 

 

6 Example of use:

http://studiogang.blog.51cto.com/505887/386852

 

Main concerns: Under the condition that the number of visits remains the same and the number of concurrency increases, what is the maximum throughput rate of the following parameter changes?

 

/*One of the indicators that everyone cares about most, refers to the throughput rate

相当于 LR 中的 每秒事务数 ,后面括号中的 mean 表示这是一个平均值*/  

Requests per second:    13.45 [#/sec] (mean)

/*大家最关心的指标之二,指的是用户平均请求等待时间

相当于 LR 中的 平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值*/ 

Time per request:       743.726 [ms] (mean) 

/*大家最关心的指标之三,指的是服务器平均请求处理时间

Time per request:       74.373 [ms] (mean, across all concurrent requests)  

 

压力测试工具: jmeter 工具

官网:http://jmeter.apache.org/ 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326989583&siteId=291194637