Other performance testing tools
wrk benchmark tool
- wrk is an open source, HTTP protocol benchmarking tool
- Benchmark test: refers to the realization of a quantitative and comparable test of a certain performance index of a class of test objects by designing scientific test methods, test tools and test systems
Features:
- High concurrency and low resource consumption
- Simple installation and deployment
- Primitive support LuaJIT script
- But: Not suitable for performance testing of multiple protocols and complex scenarios
wrk install
进入文件夹>> make
Verification: ./wrk -v View version information
1. Install git : yum install git -y
git clone https://gitee.com/mirrors/wrk.git
gitee.com website: Code Cloud
- 2. Enter the wrk folder
- 3. Rely on gcc, then make, install gcc: yum install gcc -y, the following figure shows that the installation is complete
- 4. View version information: ./wrk -v
wrk walkthrough
1. Get request, explanation: .wrk/ -t 10 -c 100 -d 10s https:www.baidu.com
means: simulate 10 clients to establish 100 connections in 10 seconds and visit Baidu
- 6. POST request
- First create a data.lua file: vi data lua
- Enter in the file:
wrk.method="POST"
wrk.headers["Content-Type"]="application/json"
wrk.body="{"mobilephone":"18874147777","pwd":"123456"} " - ./wrk -t 4 -c 100 -d 60s ./data.lua --latency http://192.168.00.000:8080/app/mobile/api/user/login
- Then execute: ./wrk -t 4 -c 100 -d 60s -s ./data.lua --latency http://192.168.00.000:8080/app/mobile/api/user/login
ab performance test
ApacheBench(ab)
Released with apache, free and open source. It
is a single-threaded command line tool for measuring http server performance
-
Features
Small and flexible, quick to learn and get started,
powerful statistics function
But: can't do complex script development, no graphical interface, can't do monitoring
ab install
Install
centos: sudo yum -y install httpd-tools
Ubuntu: sudo apt-get -y install apache2-utils
Verify
ab -V: view the version number
ab --help: Get help information,
ab parameter options,
ab exercises,
wrk initiates more pressure, ab initiates less pressure
ngrinder
- nGrinder is a very easy-to-use, powerful stress testing tool with a simple and friendly user interface and a controller-agent distributed structure. Its script supports Jython and Groovy languages
- It consists of a Controller and multiple Agents connected to it. The user manages and controls the test through the web interface, and views the test report
. Upload the two packages as shown below.
Determine the firewall status: systemctl status firewalld
Unzip Tomcat: tar -xzvf apache-tomcat-8.5.50.tar.gz
Copy the ngrind.war package to
Open the service in tomcat's webapps folder : http://192.168.30.135:8080/ngrinder-controller-3.5.2
If there are multiple tomcats in the computer, look for vim, and if there is no vim, install vim: yum install vim -y, and then use the vim server.xml command to check the port
If the port is occupied, the port number can be changed directly
after opening the service, log on to download proxy
upload agent, extract the tar package
to view agent and other documents
proxy management can see their machines
ngrinder create a script
and performance testing, set the parameters, select Change created Script