Updated aiohttp benchmarks with uvloop

This commit is contained in:
Channel Cat 2016-10-14 20:06:29 -07:00
parent 385158b84d
commit bad1b9da86
2 changed files with 17 additions and 1 deletions

View File

@ -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

View 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])