Apache AB Test Tool use Method (no parameters, get parameters, post parameters) (GO)

Source: Internet
Author: User

Transfer from Apache AB Test tool (no parameters, get parameters, post parameters)

AB test tools are Apache's own testing tools, with simple and easy to use features, below I summarize my usage, first go to the official download Apache package, I under the latest version apache2.4.23,http://httpd.apache.org/download.cgi

I downloaded the version of Windows, unzip it and put it into a directory.

1. Exhale the console

You can use the system's own cmd or the Xshell tool to

2. Go to the Bin directory under Apache Ab.exe is here

3. How to use

Entering AB Enter directly in this directory will list the use Help

How to use:ab [Options] [http://]hostname[:p ort]/path

I'm only here to describe common commands.

-N: Total number of requests (minimum default is 1)

-C: Number of concurrent times (minimum default is 1 and cannot be greater than the total number of requests, such as: 10 requests, 10 concurrency, actually 1 requests 1 times)

-p:post parameter document path (to be used with-p and-t parameters)

-t:header Header Content Type (remember here is the uppercase English letter T)

The following direct write request path:http://www.test.com/xxx/xxx.html

4. Request without a reference method

Input: Ab-n 10-c http://paycenter.gotrip8.com/querypay.aspx

5. Get method Request

Input: Ab-n 10-c "http://paycenter.gotrip8.com/querypay.aspx? version=1.0&inputcharset=gbk&signtype=md5&platformcode=cpota&orderno=test0123456784&sign= 185fa68ca23aae7b3a02a226abd30297 "

Note: The request URL is enclosed in double quotation marks, otherwise AB does not recognize the & symbol.

6. Post Method request

Parameter document: parameter document content using the "Key=value&key=value&key=value ..." Method for stitching, and JSON way, but I did not succeed in the experiment, receive parameters, the specific reason unknown

Input: Ab-n 10-c 10-p D:\test\querypay.txt-T application/x-www-form-urlencoded http://paycenter.gotrip8.com/querypay.aspx

Note:-p is the parameter document path,-T is an uppercase English letter, and the Post form format is: application/x-www-form-urlencoded

7. Test results

Mainly see three of data

Requests per second: throughput rate

A quantitative description of the server concurrency processing capability, in REQS/S, which refers to the number of requests processed per unit of time for a concurrent user. The maximum number of requests per unit of time that a concurrent user could process, called the maximum throughput rate.
Calculation formula: Total number of requests/time taken to complete these requests, i.e.
Request per second = Completerequests/time taken for tests

Time Perrequest: The average user request latency is above

The amount of time spent processing all requests completed/(total requests/concurrent users), i.e.
Time per request = time taken for tests/(complete requests/concurrency level)

Time Perrequest: The following is the average server request processing times

The number of times/total requests that are processed to complete all requests, i.e.
Time Taken For/testscompleterequests
As you can see, it is the reciprocal of the throughput rate.
At the same time, it also = user average request waiting time/number of concurrent users, i.e.
Time per Request/concurrencylevel

You can adjust the concurrency number to see the top three changes to tune the server based on the number of fixed concurrency, the number of requests or the number of fixed requests .

Apache AB Test Tool use Method (no parameters, get parameters, post parameters) (GO)

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.