httpbench - Simple HTTP benchmarking tool
httpbench -u <url or urllist.txt> -d sec -c concurrent -r rps [-t ms] [-e expected]
HTTP Bench is a small program for Linux, UNIX and a like written in C which can be used to benchmark HTTP servers. For more infos please consult the project website.
-u url or urllist.txt
-
An URL to benchmark if argument begins with http:// or https:// or a path to a text file containing a list of all HTTP-URLs to request during a benchmark. Each line should start with http:// or https://.
-d seconds
-
Duration of the benchmark in seconds. E.g. 300 for a five minutes benchmark.
-c concurrent
-
Number of cuncurrent threads used by the benchmark.
-r rps
-
Requests per second wanted for the benchmark.
-t timeoutms
-
Timeout in milliseconds for each request. This timeout will actually not interrupt any requests. It's there just for statistical reasons. E.g. how many requests take longer than x milliseconds?
-e expectedresponsestr
-
The expected response of a request. E.g. all requests should contain HTML in its reponse. All responses not matching are counted and reported.
httpbench -u mylist.txt -d 60 -c 10 -r 1000
-
Iterates over each url in mylist.txt with 10 cuncurrent threads for 60 seconds and tries to reach 1000 requests per second. Each curl failure will be reported at the end of the test (total count and total %).
httpbench -u http://www.example.com -d 300 -c 1000 -r 10000 -t 20 -e "Hello World"
-
Benchmarks the single URL http://www.example.com with 1000 cuncurrent threads for 5 minutes and tries to reach 10000 requests per second. Each request which takes longer than 20 milliseconds will be reported at the end of the test (total count and total %) and each request which does not contain "Hello World" in its response string will also be reported (total count and total %). The curl errors will also be reported.
See package description or project website.
Paul Buetow - <http://httpbench.buetow.foo>