Updated aiohttp benchmarks with uvloop
This commit is contained in:
parent
385158b84d
commit
bad1b9da86
|
@ -13,7 +13,6 @@ All tests were run on a AWS medium instance running ubuntu, using 1 process. Ea
|
||||||
| Sanic | Python 3.5 + uvloop | 29,128 | 3.40ms |
|
| Sanic | Python 3.5 + uvloop | 29,128 | 3.40ms |
|
||||||
| Falcon | gunicorn + meinheld | 18,972 | 5.27ms |
|
| Falcon | gunicorn + meinheld | 18,972 | 5.27ms |
|
||||||
| Flask | gunicorn + meinheld | 4,988 | 20.08ms |
|
| Flask | gunicorn + meinheld | 4,988 | 20.08ms |
|
||||||
| Aiohttp | Python 3.5 | 2,187 | 56.60ms |
|
|
||||||
|
|
||||||
## Hello World
|
## Hello World
|
||||||
|
|
||||||
|
|
17
tests/performance/aiohttp/simple_server.py
Normal file
17
tests/performance/aiohttp/simple_server.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Run with python3 simple_server.py PORT
|
||||||
|
|
||||||
|
from aiohttp import web
|
||||||
|
import asyncio
|
||||||
|
import sys
|
||||||
|
import uvloop
|
||||||
|
|
||||||
|
loop = uvloop.new_event_loop()
|
||||||
|
asyncio.set_event_loop(loop)
|
||||||
|
|
||||||
|
async def handle(request):
|
||||||
|
return web.json_response({"test":True})
|
||||||
|
|
||||||
|
app = web.Application(loop=loop)
|
||||||
|
app.router.add_route('GET', '/', handle)
|
||||||
|
|
||||||
|
web.run_app(app, port=sys.argv[1])
|
Loading…
Reference in New Issue
Block a user