https://github.com/povilasb/httpmeter
Hackable HTTP benchmarking tool written in Python
https://github.com/povilasb/httpmeter
asyncio benchmarking http python3
Last synced: 4 months ago
JSON representation
Hackable HTTP benchmarking tool written in Python
- Host: GitHub
- URL: https://github.com/povilasb/httpmeter
- Owner: povilasb
- License: other
- Created: 2017-01-19T05:50:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-02-26T02:15:07.000Z (almost 5 years ago)
- Last Synced: 2025-07-10T06:36:45.925Z (7 months ago)
- Topics: asyncio, benchmarking, http, python3
- Language: Python
- Size: 35.2 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
=====
About
=====
.. image:: https://travis-ci.org/povilasb/httpmeter.svg?branch=master
:target: https://travis-ci.org/povilasb/httpmeter
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
How many requests should be executed in parallel.
-n, requests
How many requests to make in total.
-H, --header
Additional headers to send with every request. Multiple entries
allowed. E.g.
--header "Connection: close" --header "User-Agent: benchmark"
-X, --proxy
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
===========
* https://github.com/httperf/httperf
* https://github.com/wg/wrk
* http://httpd.apache.org/docs/current/programs/ab.html
* https://github.com/borgstrom/httpbenchmark
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