1. Download and install
https://jmeter.apache.org/download_jmeter.cgi download the following zip file
Unzip after downloading
2. Run
Find the following bat file in the bin directory and double-click to run
3. Configuration
Very small font size after startup
(1) Change the default font in the properties file in the bin directory
(2) After opening the interface, the font is still very small... as follows, click more
(3) Language selection Simplified Chinese
The page becomes more comfortable like this
4. Use
Our tests are to simulate how many people request an interface at the same time to test its performance
(1) Add a test plan. I am here to test Baidu
(2) Add thread group
200 means 200 threads, 1 second means that 200 threads are started at the same time within 1 second, and the number of cycles represents how many times the above behavior is done
(3) Add several useful things in the listener to observe the results and performance
Here I have added four commonly used
(4) Execute the execution plan and analyze
Click Start on the upper left
analysis
Result tree
Seeing that as long as one request fails in the result tree, the probability is still due to network fluctuations
Summary report
The sample represents the total number of requests, followed by the average thread execution time, the minimum time, etc. in milliseconds, the throughput is 1063 per second, and the size of the sent data, etc.
Aggregate report
You can see the average completion time of a single request, and the completion time of 99% of the requests are within 1325 milliseconds, as well as the abnormal occurrence rate
Then there is a summary diagram, which can be generated after checking each field of the summary report
5. Test the homepage
Adjust the maximum heap memory from 128m to 512m
The average time and 99% request completion time are much smaller, and you can see that QPS has risen but not much. This is one of the optimizations.