可破解的http基准测试工具。
httpmeter的Python项目详细描述
这是一个可破解的基于python的http/https基准测试工具。 它支持http和https的流量代理,因此也可以用于 测试代理服务器的性能。
它是用asyncio实现的,在python>;=3.5上运行。 您可以选择将uvloop用于 更好的表现。
用法
pip3 install httpmeter
概要:
httpmeter [options] URL
选项:
-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.
其他工具
开发
获取依赖项:
$ virtualenv --python3 pyenv $ pyenv/bin/pip install -r requirements/prod.txt
运行基准:
$ pyenv/bin/python -m httpmeter -c 100 -n 500 \ -X http://username:password@1.2.3.4:8080 http://target.com