import requests


def user_metrics(ID):
    """
    GET user metrics from server
    Args:
        ID (str): user name
    Returns:
        r7.json() (dict): Dictionary containing the user metrics of
                         number of times used and latency for each method
    """
    mjson = {
        "username": ID
    }
    r7 = requests.get("http://vcm-9030.vm.duke.edu:5000/api/user_metrics",
                      json=mjson)
    return r7.json()