Mercurial > hg > truffle
comparison mx/sanitycheck.py @ 4480:7d6490436b57
Add Scala DaCapo benchs
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 07 Feb 2012 15:59:29 +0100 |
parents | be787de79394 |
children | 7903b6c28f9c |
comparison
equal
deleted
inserted
replaced
4476:00efac2934d3 | 4480:7d6490436b57 |
---|---|
37 'h2': [0, 0, 5, 5, 8], | 37 'h2': [0, 0, 5, 5, 8], |
38 'jython': [0, 0, 5, 10, 13], | 38 'jython': [0, 0, 5, 10, 13], |
39 'luindex': [0, 0, 5, 10, 10], | 39 'luindex': [0, 0, 5, 10, 10], |
40 'lusearch': [0, 4, 5, 5, 8], | 40 'lusearch': [0, 4, 5, 5, 8], |
41 'pmd': [0, 0, 5, 10, 13], | 41 'pmd': [0, 0, 5, 10, 13], |
42 'sunflow': [0, 0, 5, 10, 15], | 42 'sunflow': [2, 0, 5, 10, 15], |
43 'tomcat': [0, 0, 5, 10, 15], | 43 'tomcat': [0, 0, 5, 10, 15], |
44 'tradebeans': [0, 0, 5, 10, 13], | 44 'tradebeans': [0, 0, 5, 10, 13], |
45 'tradesoap': [2, 4, 5, 10, 15], | 45 'tradesoap': [2, 4, 5, 10, 15], |
46 'xalan': [0, 0, 5, 10, 18], | 46 'xalan': [0, 0, 5, 10, 18], |
47 } | |
48 | |
49 dacapoScalaSanityWarmup = { | |
50 'actors': [0, 0, 2, 8, 10], | |
51 'apparat': [0, 0, 1, 2, 3], | |
52 'factorie': [0, 0, 2, 5, 5], | |
53 'kiama': [0, 0, 3, 13, 15], | |
54 'scalac': [0, 0, 5, 15, 20], | |
55 'scaladoc': [0, 0, 5, 15, 15], | |
56 'scalap': [0, 0, 5, 15, 20], | |
57 'scalariform':[0, 0, 6, 15, 20], | |
58 'scalatest': [0, 0, 2, 10, 12], | |
59 'scalaxb': [0, 0, 5, 15, 25], | |
60 'specs': [0, 0, 3, 13, 18], | |
61 'tmt': [0, 0, 3, 10, 12] | |
47 } | 62 } |
48 | 63 |
49 dacapoGateBuildLevels = { | 64 dacapoGateBuildLevels = { |
50 'avrora': ['product', 'fastdebug', 'debug'], | 65 'avrora': ['product', 'fastdebug', 'debug'], |
51 'batik': ['product', 'fastdebug', 'debug'], | 66 'batik': ['product', 'fastdebug', 'debug'], |
61 'tradebeans': ['product', 'fastdebug', 'debug'], | 76 'tradebeans': ['product', 'fastdebug', 'debug'], |
62 'tradesoap': ['product'], | 77 'tradesoap': ['product'], |
63 'xalan': ['product', 'fastdebug', 'debug'], | 78 'xalan': ['product', 'fastdebug', 'debug'], |
64 } | 79 } |
65 | 80 |
81 dacapoScalaGateBuildLevels = { | |
82 'actors': ['product', 'fastdebug', 'debug'], | |
83 'apparat': ['product', 'fastdebug', 'debug'], | |
84 'factorie': ['product', 'fastdebug', 'debug'], | |
85 'kiama': ['product', 'fastdebug', 'debug'], | |
86 'scalac': ['product', 'fastdebug', 'debug'], | |
87 'scaladoc': ['product', 'fastdebug', 'debug'], | |
88 'scalap': ['product', 'fastdebug', 'debug'], | |
89 'scalariform':['product', 'fastdebug', 'debug'], | |
90 'scalatest': ['product', 'fastdebug', 'debug'], | |
91 'scalaxb': ['product', 'fastdebug', 'debug'], | |
92 'specs': ['product', 'fastdebug', 'debug'], | |
93 'tmt': ['product', 'fastdebug', 'debug'], | |
94 } | |
95 | |
66 class SanityCheckLevel: | 96 class SanityCheckLevel: |
67 Fast, Gate, Normal, Extensive, Benchmark = range(5) | 97 Fast, Gate, Normal, Extensive, Benchmark = range(5) |
68 | 98 |
69 def getSPECjvm2008(benchArgs = [], skipKitValidation=False, warmupTime=None, iterationTime=None): | 99 def getSPECjvm2008(benchArgs = [], skipKitValidation=False, warmupTime=None, iterationTime=None): |
70 | 100 |
115 dacapoTime = re.compile(r"===== DaCapo 9\.12 (?P<benchmark>[a-zA-Z0-9_]+) PASSED in (?P<time>[0-9]+) msec =====") | 145 dacapoTime = re.compile(r"===== DaCapo 9\.12 (?P<benchmark>[a-zA-Z0-9_]+) PASSED in (?P<time>[0-9]+) msec =====") |
116 | 146 |
117 dacapoMatcher = Matcher(dacapoTime, {'const:name' : 'benchmark', 'const:score' : 'time'}) | 147 dacapoMatcher = Matcher(dacapoTime, {'const:name' : 'benchmark', 'const:score' : 'time'}) |
118 | 148 |
119 return Test("DaCapo-" + name, "DaCapo", ['-jar', dacapo, name, '-n', str(n), ] + dacapoArgs, [dacapoSuccess], [dacapoFail], [dacapoMatcher], ['-Xms2g', '-XX:MaxPermSize=256m']) | 149 return Test("DaCapo-" + name, "DaCapo", ['-jar', dacapo, name, '-n', str(n), ] + dacapoArgs, [dacapoSuccess], [dacapoFail], [dacapoMatcher], ['-Xms2g', '-XX:MaxPermSize=256m']) |
150 | |
151 def getScalaDacapos(level=SanityCheckLevel.Normal, gateBuildLevel=None, dacapoArgs=[]): | |
152 checks = [] | |
153 | |
154 for (bench, ns) in dacapoScalaSanityWarmup.items(): | |
155 if ns[level] > 0: | |
156 if gateBuildLevel is None or gateBuildLevel in dacapoScalaGateBuildLevels[bench]: | |
157 checks.append(getScalaDacapo(bench, ns[level], dacapoArgs)) | |
158 | |
159 return checks | |
160 | |
161 def getScalaDacapo(name, n, dacapoArgs=[]): | |
162 dacapo = mx.get_env('DACAPO_SCALA_CP') | |
163 if dacapo is None: | |
164 l = mx.library('DACAPO_SCALA', False) | |
165 if l is not None: | |
166 dacapo = l.get_path(True) | |
167 else: | |
168 mx.abort('Scala DaCapo 0.1.0 jar file must be specified with DACAPO_SCALA_CP environment variable or as DACAPO_SCALA library') | |
169 | |
170 if not isfile(dacapo) or not dacapo.endswith('.jar'): | |
171 mx.abort('Specified Scala DaCapo jar file does not exist or is not a jar file: ' + dacapo) | |
172 | |
173 dacapoSuccess = re.compile(r"^===== DaCapo 0\.1\.0(-SNAPSHOT)? ([a-zA-Z0-9_]+) PASSED in ([0-9]+) msec =====$") | |
174 dacapoFail = re.compile(r"^===== DaCapo 0\.1\.0(-SNAPSHOT)? ([a-zA-Z0-9_]+) FAILED (warmup|) =====$") | |
175 dacapoTime = re.compile(r"===== DaCapo 0\.1\.0(-SNAPSHOT)? (?P<benchmark>[a-zA-Z0-9_]+) PASSED in (?P<time>[0-9]+) msec =====") | |
176 | |
177 dacapoMatcher = Matcher(dacapoTime, {'const:name' : 'benchmark', 'const:score' : 'time'}) | |
178 | |
179 return Test("Scala-DaCapo-" + name, "Scala-DaCapo", ['-jar', dacapo, name, '-n', str(n), ] + dacapoArgs, [dacapoSuccess], [dacapoFail], [dacapoMatcher], ['-Xms2g', '-XX:MaxPermSize=256m']) | |
120 | 180 |
121 def getBootstraps(): | 181 def getBootstraps(): |
122 time = re.compile(r"Bootstrapping Graal\.+ in (?P<time>[0-9]+) ms") | 182 time = re.compile(r"Bootstrapping Graal\.+ in (?P<time>[0-9]+) ms") |
123 scoreMatcher = Matcher(time, {'const:name' : 'const:BootstrapTime', 'const:score' : 'time'}) | 183 scoreMatcher = Matcher(time, {'const:name' : 'const:BootstrapTime', 'const:score' : 'time'}) |
124 tests = [] | 184 tests = [] |