How to use
For example, the address to be measured: http://localhost:8080/web/test/ajax/testDB.do
Use AB to simulate concurrent pressure:
ab-n1000-c100 http://localhost:8080/web/test/ajax/testDB.do
Parameter-N: Total requests
Parameter-C: concurrent number
For the above command, the meaning is: a total of 1000 requests, 100 concurrent each time. That is to say, the 1000 requests are divided into 10 batches, and each batch comes out at the same time 100. Test Result Description
At the end of the AB run, a report is automatically generated as follows:
the above several important parameter explanation:
Concurrency level: The number of concurrent requests, which is the value set by the-c parameter
Time taken for tests: duration of the entire test
Complete requests: How many requests have been completed, that is,-----N This parameter
Failed requests: Number of failures
Total transferred: Throughout the process, the amount of network traffic
HTML transferred: The amount of HTML transmission throughout the process
Requests per second: throughput rate. This is one of the most concerned metrics of a Web application, and the mean in parentheses says this is an average
time per request: Average user Latency each time
Time per request: The following is the average server request processing times
Transfer rate: The average traffic on the network per second can help eliminate the problem of excessive network traffic leading to longer response times.
The following list of "Connection times":
Represents an explosion of time consumed on a network
The following "percentage of the requests served within a certain time":
Describes the distribution of each request processing time: 50% of the processing time is within 24561ms, and 90% of the processing time is within 27501MS. what to do with the landing page
Get cookies First:
Ab-n 100-c Key=value http://test.com/
Then add a cookie to request the page:
Ab-c cookie1_name=cookie1_value-c cookie2_name=cookie2_value
... or
ab-h "cookie:cookie1_name=cookie1_value; Cookie2_name=cookie2_value "...