MCPcopy
hub / github.com/aio-libs/aiohttp / init

Function init

benchmark/async.py:47–55  ·  view source on GitHub ↗
(loop)

Source from the content-addressed store, hash-verified

45
46 @asyncio.coroutine
47 def init(loop):
48 app = web.Application(loop=loop)
49 app.router.add_route('GET', '/prepare', prepare)
50 app.router.add_route('GET', '/stop', stop)
51 app.router.add_route('GET', '/test/{name}', test)
52
53 handler = app.make_handler(keep_alive=15, timeout=None)
54 srv = yield from loop.create_server(handler, host, port)
55 return srv, app, handler
56
57 loop = asyncio.get_event_loop()
58 srv, app, handler = loop.run_until_complete(init(loop))

Callers 1

run_aiohttpFunction · 0.70

Calls 3

make_handlerMethod · 0.95
add_routeMethod · 0.45
create_serverMethod · 0.45

Tested by

no test coverage detected