def display_results(name, config_file, data, old_data=None):
    matched, missed, duration = data
    msg = "%s Config (%s)" % (name, config_file)
    print msg
    print "=" * len(msg)
    if old_data is None:
        print "matched: %5d" % matched
        print "missed:  %5d" % missed
        print "duration:%9.3fs" % duration
        print
    else:
        old_matched, old_missed, old_duration = old_data
        print "matched: %5d" % matched,
        if matched > old_matched:
            adj = "more"
        else:
            adj = "less"
        diff_abs = abs(old_matched - matched)
        diff_percent = diff_abs / float(old_matched) * 100
        print "     (%.0f%% %s)" % (diff_percent, adj)
        print "missed:  %5d" % missed
        print "duration:%9.3fs" % duration,
        if duration < old_duration:
            adj = "faster"
        else:
            adj = "slower"
        diff_abs = abs(old_duration - duration)
        diff_percent = diff_abs / float(old_duration) * 100
        print "(%.0f%% %s)" % (diff_percent, adj)
Display results of config evaluation.
dataset/ETHPy150Open ClockworkNet/wtop/robots/compare_robots_configs.py/display_results