- 站点压力測试工具
使用siege这个工具去进行压力測试,这个既能够进行http和https进行压力測试。
- 编译方法
wget http://download.joedog.org/siege/siege-latest.tar.gz
tar -zxvf siege-latest.tar.gz
sudo apt-get install openssl openssh-server openssh-client libssl-dev
sudo apt-get install gcc g++
cd siege-3.1.0/
su root
password input
./configure -with-ssl=你的opensslv.h的路径
请使用which指令 which openssl
或者使用find命令 find /usr -name openssl*
make
make install
能够去改动配置文件 vim ~/.siegerc
改动log日志的配置路径
sudo siege -c 500 -r 200000 -u "https://域名/接口/參数"---GET请求
sudo siege -c 500 -r 200000 -u "https://域名/接口 POST 參数"
详细的使用參数使用方式是 man siege
Lifting the server siege.. done.
Transactions: 1921 hits
Availability: 65.38 %
Elapsed time: 167.65 secs
Data transferred: 302.45 MB
Response time: 36.38 secs
Transaction rate: 11.46 trans/sec
Throughput: 1.80 MB/sec
Concurrency: 416.80
Successful transactions: 1921
Failed transactions: 1017
Longest transaction: 69.42
Shortest transaction: 1.58