ТЭ
@timeit
def with_async_wrap_sync_requests_aiohttp():
loop = asyncio.get_event_loop()
import aiohttp
async def get():
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
print(response.status)
async_tasks = [loop.create_task(get()) for _ in range(count)]
return loop.run_until_complete(asyncio.gather(*async_tasks))
with_async_wrap_sync_requests 11.957862138748169with_async_wrap_sync_requests_aiohttp 0.5534532070159912url = 'https://go.mail.ru/'
count = 100


