Siege pressure test

Source: Internet
Author: User

Installation
wget Http://download.joedog.org/siege/siege-latest.tar.gztar zxf siege-latest.tar.gzcd siege-4.0.4/./configure && sudo make && sudo make install

You can verify that the installation was successful by viewing the version number:

Siege-v
Method of Use and description

The format used by siege is siege [options] URL

Parameters (Options) description
-C--concurrent concurrency-B--benchmark request no delay between-D--delay specifies the delay time, that is, after each request is issued, a random delay for a period of time to send the next request-T--time specify the time of the test, the default in minutes, If you want to use a different unit to display points, such as,-t10s, means that the test lasts 10s-r--reps the number of rounds specified test,-T and-R are to specify the test end condition. -H--header Add HTTP header information-f--file Specifies the file that holds the URL. This parameter is useful if you want to have more than one URL to test with the-I parameter.
###########-i--internet random test URL, used when testing multiple URLs at the same time, simulating user random access situation-V--version view version Information-H--HELP view Help information-G--get Display HTTP header information, For debug-l--log specified log file, if not specified siege also has a default file save location, file name siege.log-a--user-agent Specify HTTP request user-agent field Content-T-- Content-type specifying the contents of the Content-type field in an HTTP request

Get Request Method Test

1. The form of the command line, for example:

$ Siege Http://www.test.com-c100-r5-b ... Transactions:         hitsavailability:      100.00%elapsed time: 3.43 secsdata        transferred:        0.11 mbresponse Time:        0.65 secstransaction rate:      145.77 trans/secthroughput:        0.03 mb/secconcurrency:       95.20Successful transactions:         500Failed transactions:           0Longest transaction:        3.02Shortest transaction:        0.05

Command Description:-c100 represents 100 concurrent users in the test,-R5 represents the end of the 5-round test, and-B indicates that there is no lag between each request, that is, the next request is initiated when the answer is received.

Results: 500 requests were completed in 3.43 seconds, 0.11MB data were transmitted, average response time was 0.65 seconds, average request 145.77 times per second, topological volume 0.03mb/sec, average concurrency of 95.20

2. File storage URL form, for example:

$ siege-c100-r5-f Urls_file.txt-b

The contents of Urls_file.txt are as follows:

Http://www.test.com

Is the same as the command line ($ siege http://www.test.com-c100-r5-b) effect.

The file hosting URL is primarily used in situations where multiple URL requests are available.

Post Request Method test

1. The form of the command line, for example:

$ siege-c 100-r 5-h "cookie:token=123;time=456" http://www.test.com POST type=210&param={"text": "%e5%8c%97%e4%ba% "}

2. File storage URL form, for example:

$ siege-c 100-r 5-h "cookie:token=123;time=456"-F/post_req.txt-bpost_req.txt content http://www.test.com post TYPE=210&A mp;&param={"text": "%e5%8c%97%e4%ba%"}

Note that if the URL or parameter contains spaces or the Chinese needs to be URL-encoded and then sent

Siege pressure test

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.