def total_duration_parser(line):
    """
    Parses lines of the following form:

        Total duration: 5248.89s

    :param line: string
    :return: float containing total duration in seconds
    """
    try:
        return float(line.rstrip('s')[len('Total duration:'):].strip())
    except:
        return 0.