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

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