import asyncio


async def measure_response_time(session, url):
    """
    Fetching an url by performing GET request. Measure the response time.
    :param aiohttp.ClientSession session: All requests in one session, for connection pooling.
    :param str url: Full URL for request.
    :return dict: Dict containing measurements info. For example:
            {
                "url": "https://google.com",
                "status_code": 200,
                "time": 0.05735192599968286
            }
    """
    start = asyncio.get_event_loop().time()
    try:
        async with session.get(url) as response:
            await response.read()
            stop = asyncio.get_event_loop().time()
            return {"url": url, "status_code": response.status, "time": stop - start}
    except Exception:
        stop = asyncio.get_event_loop().time()
        return {"url": url, "status_code": None, "time": stop - start}