source: proto/SymbolTable/src/perf_script.py @ 1721

Last change on this file since 1721 was 1721, checked in by vla24, 8 years ago

SymbolTable?: completed dictionary implementation and refactored templates

File size: 1.2 KB
Line 
1from subprocess import *
2import os
3from string import *
4
5testfile_home = "../../../trunk/QA/TD/"
6#programs = ['xmlwf','expat','Xerces_SAX','Xerces_DOM']
7programs = ['xmlwf']
8testfiles = ['dew.xml','jaw.xml','roads-2.gml','po.xml','soap.xml']
9#testfiles = ['dew.u16','jaw.u16','po.u16','roads-2.u16','soap.u16']
10def run_test():     
11  mes_f = open('mesfile', 'w')
12  for program in programs:
13    for testfile in testfiles:
14      for i in range(10):
15        call(['./'+program, testfile_home+testfile], stderr=mes_f)
16
17def analyze_rslt():
18      mes_f = open('mesfile', 'r')
19      results = mes_f.read().split(' ')
20      results_int = []
21      rows = {}
22      for r in results[:-1]:
23        results_int.append(int(r))
24      first_row = '\t\t'
25      for testfile in testfiles:
26        first_row += testfile + '  &\t'
27      first_row =  first_row[:-4]
28      print first_row
29      for program in programs:
30        row = program + '   &\t'
31        for testfile in testfiles:
32          result = results_int[0:10]
33          results_int = results_int[10:]
34          row +=  str(min(result)/1000.0) + '   &\t'
35        row = row[:-4]
36        row +='\\\\ \\hline'
37        print row
38       
39       
40       
41if __name__ == "__main__":
42  run_test()
43  analyze_rslt()
44 
45
46           
47       
48       
49       
50       
51       
52       
53       
54       
55       
56       
57       
58       
59       
60       
Note: See TracBrowser for help on using the repository browser.