Use AB to do the stress test on the web system __ pressure test

Source: Internet
Author: User
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 "...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.