[go: up one dir, main page]

Skip to content

Hackable HTTP benchmarking tool written in Python

License

Notifications You must be signed in to change notification settings

povilasb/httpmeter

Repository files navigation

About

https://travis-ci.org/povilasb/httpmeter.svg?branch=master

This is a hackable python based HTTP/HTTPS benchmarking tool. It supports traffic proxying for both HTTP and HTTPS, thus also can be used to test performance of proxy servers.

It is implemented with asyncio and runs on Python >= 3.6. You can optionally use uvloop for better performance.

Usage

pip3 install httpmeter

Synopsis:

httpmeter [options] URL

Options:

-h  Display usage information.

-c, --concurrency <N>
    How many requests should be executed in parallel.

-n, requests <N>
    How many requests to make in total.

-H, --header <custom-header>
    Additional headers to send with every request. Multiple entries
    allowed. E.g.
        --header "Connection: close" --header "User-Agent: benchmark"

-X, --proxy <http://user:pass@proxy:port>
    Proxy address. E.g. http://user1:pass123@localhost:8080

--uvloop
    Use uvloop to increase networking performance.

-p N, --process-count N
    Use N processes to distribute requests over separate CPU cores.
    By default uses the same number of processes as there are CPU
    cores.

Other Tools

Development

Get dependencies:

$ virtualenv --python3 pyenv
$ pyenv/bin/pip install -r requirements/prod.txt

Run the benchmark:

$ pyenv/bin/python -m httpmeter -c 100 -n 500 \
    -X http://username:password@1.2.3.4:8080 http://target.com

About

Hackable HTTP benchmarking tool written in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published