import re


def get_efficiency(line):
    """
    Scraps data for efficiency output
    :param line: line of a file (str)
    :return: tuple --> regex obj (can be treated as bool), name, efficiency
    """
    name = ''
    eff = 0.
    match_obj = re.match(r'\s>\s(.*):\s(.*)', line)
    if match_obj:
        if 'time-per-iter' in line:
            name = str(match_obj.group(1))
            eff = float(match_obj.group(2))
        else:
            match_obj = False
    return match_obj, name, eff