def stat_lookup(perf_dict, counter_name):
    """
    Performance the lookup of the supplied counter name against the dictionary and returns a counter Id

    :param perf_dict: The array containing the performance dictionary (with counters and IDs)
    :param counter_name: The counter name in the correct format for the dictionary
    """
    counter_key = perf_dict[counter_name]
    return counter_key