Install dependencies:
pip install quart hypercorn uvloop uvicorn
To compare hypercorn, uvicorn, and hypercorn using uvloop, run (in separate terminals)
python -m localstack.aws.asgi hypercorn 4566
python -m localstack.aws.asgi uvicorn 4567
python -m localstack.aws.asgi hypercorn_uvloop 4568
Then use benchmark.py
and edit the ports array to [4566, 4567, 4567]
, and run the script.
You can also use hey
hey -c 1 -H "Connection: keep-alive" http://localhost:4567