@@ -0,0 +1,2154 @@
+#!/usr/bin/env python%0A%0Aimport os%0Aimport argparse%0Aimport sys%0A%0Adef checkExist(file, flags=os.F_OK):%0A    if not os.path.exists(file) or not os.access(file, flags):%0A        return False%0A    return True%0A%0Adef getResult(directory, app, size, machine, num):%0A    i = 0%0A    annot = %22@%22%0A    if app.startswith(%22partition%22) or app.startswith(%22partial_sort%22) or app.startswith(%22nth_element%22):%0A        annot = %22N%22%0A    if app.endswith('0'):%0A        app = app%5B:-3%5D%0A        annot = %22 %22%0A    elif app.endswith('1'):%0A        app = app%5B:-3%5D%0A        if annot.startswith('N'):%0A            pass%0A        else:%0A            annot = %22@%22%0A    else:%0A        pass%0A    file = directory + '/stats.txt'%0A    if checkExist(file):%0A        for line in open(file):%0A            i += 1%0A            if i == 1:%0A                stub1, overhead = line.strip().split(' ')%0A            elif i == 4:%0A                stub1, xtern_avg = line.strip().split(' ')%0A            elif i == 5:%0A                stub1, xtern_sem = line.strip().split(' ')%0A            elif i == 7:%0A                stub1, nondet_avg = line.strip().split(' ')%0A            elif i == 8:%0A                stub1, nondet_sem = line.strip().split(' ')%0A            else:%0A                pass%0A        print '%5Ct'.join(%5Bapp, size, machine, num, annot, %0A            nondet_avg, nondet_sem, xtern_avg, xtern_sem, overhead%5D)%0A    else:%0A        print file + ' not existed yet'%0A%0Aif __name__ == %22__main__%22:%0A    parser = argparse.ArgumentParser(%0A        description='Collect stl performance number for excel')%0A    parser.add_argument('dirname',%0A        type = str,%0A        help = 'directory containing the stl result (e.g. current)') %0A    args = parser.parse_args()%0A    if args.dirname.__len__() == 0:%0A        print 'Please specify a directory!'%0A        sys.exit(1)        %0A    else:%0A        directory = os.path.abspath(args.dirname)%0A        if not checkExist(directory):%0A            print 'Invalid directory name'%0A        else:%0A            for name in os.listdir(directory):%0A                temp_name = name.strip().replace(%22stl_%22, %22%22)%0A                getResult(os.path.abspath(directory+'/'+name), temp_name, %0A                    %22large%22, %22bug01%22, %2224%22)%0A

Add getStlPerf.py for collecting stl performance numbers.