build-benchmark.xml revision 865:5b017d6edef6
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 
6 This code is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License version 2 only, as
8 published by the Free Software Foundation.
9 
10 This code is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13 version 2 for more details (a copy is included in the LICENSE file that
14 accompanied this code).
15 
16 You should have received a copy of the GNU General Public License version
17 2 along with this work; if not, write to the Free Software Foundation,
18 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 
20 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 or visit www.oracle.com if you need additional information or have any
22 questions.
23-->
24<project name="nashorn-benchmarks" default="all" basedir="..">
25
26  <target name="octane-init" depends="jar">
27    <property name="octane-tests" value="box2d code-load crypto deltablue earley-boyer gbemu navier-stokes mandreel pdfjs raytrace regexp richards splay typescript zlib"/>
28  </target>
29  
30  <!-- ignore benchmarks where rhino crashes - the test harness should do this now -->
31  <target name="octane-init-rhino" depends="jar">
32    <property name="octane-tests" value="box2d code-load crypto deltablue earley-boyer gbemu navier-stokes mandreel pdfjs raytrace regexp richards splay typescript zlib"/>
33  </target>
34
35  <!-- box2d -->
36  <target name="octane-box2d" depends="jar">
37    <antcall target="run-octane">
38      <param name="octane-tests" value="box2d"/>
39    </antcall>
40  </target>
41
42  <target name="octane-box2d-v8" depends="jar">
43    <antcall target="run-octane-v8">
44      <param name="octane-tests" value="box2d"/>
45    </antcall>
46  </target>
47
48  <target name="octane-box2d-rhino" depends="jar">
49    <antcall target="run-octane-rhino">
50      <param name="octane-tests" value="box2d"/>
51    </antcall>
52  </target>
53
54
55  <!-- code-load -->  
56  <target name="octane-code-load" depends="jar">
57    <antcall target="run-octane">
58      <param name="octane-tests" value="code-load"/>
59    </antcall>
60  </target>
61
62  <target name="octane-code-load-v8" depends="jar">
63    <antcall target="run-octane-v8">
64      <param name="octane-tests" value="code-load"/>
65    </antcall>
66  </target>
67
68  <target name="octane-code-load-rhino" depends="jar">
69    <antcall target="run-octane-rhino">
70      <param name="octane-tests" value="code-load"/>
71    </antcall>
72  </target>
73
74
75  <!-- crypto -->
76  <target name="octane-crypto" depends="jar">
77    <antcall target="run-octane">
78      <param name="octane-tests" value="crypto"/>
79    </antcall>
80  </target>
81
82  <target name="octane-crypto-v8" depends="jar">
83    <antcall target="run-octane-v8">
84      <param name="octane-tests" value="crypto"/>
85    </antcall>
86  </target>
87
88  <target name="octane-crypto-rhino" depends="jar">
89    <antcall target="run-octane-rhino">
90      <param name="octane-tests" value="crypto"/>
91    </antcall>
92  </target>
93
94
95  <!-- deltablue -->
96  <target name="octane-deltablue" depends="jar">
97    <antcall target="run-octane">
98      <param name="octane-tests" value="deltablue"/>
99    </antcall>
100  </target>
101
102  <target name="octane-deltablue-v8" depends="jar">
103    <antcall target="run-octane-v8">
104      <param name="octane-tests" value="deltablue"/>
105    </antcall>
106  </target>
107
108  <target name="octane-deltablue-rhino" depends="jar">
109    <antcall target="run-octane-rhino">
110      <param name="octane-tests" value="deltablue"/>
111    </antcall>
112  </target>
113
114
115  <!-- earley-boyer -->
116  <target name="octane-earley-boyer" depends="jar">
117    <antcall target="run-octane">
118      <param name="octane-tests" value="earley-boyer"/>
119    </antcall>
120  </target>
121
122  <target name="octane-earley-boyer-v8" depends="jar">
123    <antcall target="run-octane-v8">
124      <param name="octane-tests" value="earley-boyer"/>
125    </antcall>
126  </target>
127
128  <target name="octane-earley-boyer-rhino" depends="jar">
129    <antcall target="run-octane-rhino">
130      <param name="octane-tests" value="earley-boyer"/>
131    </antcall>
132  </target>
133
134
135  <!-- gbemu -->  
136  <target name="octane-gbemu" depends="jar">
137    <antcall target="run-octane">
138      <param name="octane-tests" value="gbemu"/>
139    </antcall>
140  </target>
141
142  <target name="octane-gbemu-v8" depends="jar">
143    <antcall target="run-octane-v8">
144      <param name="octane-tests" value="gbemu"/>
145    </antcall>
146  </target>
147
148  <target name="octane-gbemu-rhino" depends="jar">
149    <antcall target="run-octane-rhino">
150      <param name="octane-tests" value="gbemu"/>
151    </antcall>
152  </target>
153
154  <!-- mandreel -->  
155  <target name="octane-mandreel" depends="jar">
156    <antcall target="run-octane">
157      <param name="octane-tests" value="mandreel"/>
158    </antcall>
159  </target>
160
161  <target name="octane-mandreel-v8" depends="jar">
162    <antcall target="run-octane-v8">
163      <param name="octane-tests" value="mandreel"/>
164    </antcall>
165  </target>
166
167  <target name="octane-mandreel-rhino" depends="jar">
168    <antcall target="run-octane-rhino">
169      <param name="octane-tests" value="mandreel"/>
170    </antcall>
171  </target>
172
173
174  <!-- navier-stokes -->
175  <target name="octane-navier-stokes" depends="jar">
176    <antcall target="run-octane">
177      <param name="octane-tests" value="navier-stokes"/>
178    </antcall>
179  </target>
180
181  <target name="octane-navier-stokes-v8" depends="jar">
182    <antcall target="run-octane-v8">
183      <param name="octane-tests" value="navier-stokes"/>
184    </antcall>
185  </target>
186
187  <target name="octane-navier-stokes-rhino" depends="jar">
188    <antcall target="run-octane-rhino">
189      <param name="octane-tests" value="navier-stokes"/>
190    </antcall>
191  </target>
192
193
194  <!-- pdfjs -->  
195  <target name="octane-pdfjs" depends="jar">
196    <antcall target="run-octane">
197      <param name="octane-tests" value="pdfjs"/>
198    </antcall>
199  </target>
200
201  <target name="octane-pdfjs-v8" depends="jar">
202    <antcall target="run-octane-v8">
203      <param name="octane-tests" value="pdfjs"/>
204    </antcall>
205  </target>
206
207  <target name="octane-pdfjs-rhino" depends="jar">
208    <antcall target="run-octane-rhino">
209      <param name="octane-tests" value="pdfjs"/>
210    </antcall>
211  </target>
212
213
214  <!-- raytrace -->
215  <target name="octane-raytrace" depends="jar">
216    <antcall target="run-octane">
217      <param name="octane-tests" value="raytrace"/>
218    </antcall>
219  </target>
220
221  <target name="octane-raytrace-v8" depends="jar">
222    <antcall target="run-octane-v8">
223      <param name="octane-tests" value="raytrace"/>
224    </antcall>
225  </target>
226
227  <target name="octane-raytrace-rhino" depends="jar">
228    <antcall target="run-octane-rhino">
229      <param name="octane-tests" value="raytrace"/>
230    </antcall>
231  </target>
232
233
234  <!-- regexp -->
235  <target name="octane-regexp" depends="jar">
236    <antcall target="run-octane">
237      <param name="octane-tests" value="regexp"/>
238    </antcall>
239  </target>
240
241  <target name="octane-regexp-v8" depends="jar">
242    <antcall target="run-octane-v8">
243      <param name="octane-tests" value="regexp"/>
244    </antcall>
245  </target>
246
247  <target name="octane-regexp-rhino" depends="jar">
248    <antcall target="run-octane-rhino">
249      <param name="octane-tests" value="regexp"/>
250    </antcall>
251  </target>
252
253
254  <!-- richards -->
255  <target name="octane-richards" depends="jar">
256    <antcall target="run-octane">
257      <param name="octane-tests" value="richards"/>
258    </antcall>
259  </target>
260
261  <target name="octane-richards-v8" depends="jar">
262    <antcall target="run-octane-v8">
263      <param name="octane-tests" value="richards"/>
264    </antcall>
265  </target>
266
267  <target name="octane-richards-rhino" depends="jar">
268    <antcall target="run-octane-rhino">
269      <param name="octane-tests" value="richards"/>
270    </antcall>
271  </target>
272
273
274  <!-- splay -->
275  <target name="octane-splay" depends="jar">
276    <antcall target="run-octane">
277      <param name="octane-tests" value="splay"/>
278    </antcall>
279  </target>
280
281  <target name="octane-splay-v8" depends="jar">
282    <antcall target="run-octane-v8">
283      <param name="octane-tests" value="splay"/>
284    </antcall>
285  </target>
286
287  <target name="octane-splay-rhino" depends="jar">
288    <antcall target="run-octane-rhino">
289      <param name="octane-tests" value="splay"/>
290    </antcall>
291  </target>
292
293  <!-- splay -->
294  <target name="octane-typescript" depends="jar">
295    <antcall target="run-octane">
296      <param name="octane-tests" value="typescript"/>
297    </antcall>
298  </target>
299
300  <target name="octane-typescript-v8" depends="jar">
301    <antcall target="run-octane-v8">
302      <param name="octane-typescript" value="typescript"/>
303    </antcall>
304  </target>
305
306  <target name="octane-typescript-rhino" depends="jar">
307    <antcall target="run-octane-rhino">
308      <param name="octane-tests" value="typescript"/>
309    </antcall>
310  </target>
311
312  <!-- zlib -->
313  <target name="octane-zlib" depends="jar">
314    <antcall target="run-octane">
315      <param name="octane-tests" value="zlib"/>
316    </antcall>
317  </target>
318
319  <target name="octane-zlib-v8" depends="jar">
320    <antcall target="run-octane-v8">
321      <param name="octane-typescript" value="zlib"/>
322    </antcall>
323  </target>
324
325  <target name="octane-zlib-rhino" depends="jar">
326    <antcall target="run-octane-rhino">
327      <param name="octane-tests" value="zlib"/>
328    </antcall>
329  </target>
330
331  <!-- run octane benchmarks in a single process  -->
332  <target name="octane-single-process" depends="octane-init">
333    <antcall target="run-octane"/>
334  </target>
335 
336  <target name="octane-separate-process" depends=
337     "octane-box2d, octane-code-load, octane-crypto, 
338      octane-deltablue, octane-earley-boyer, octane-gbemu,
339      octane-mandreel, octane-navier-stokes, octane-pdfjs, 
340      octane-raytrace, octane-regexp, octane-richards, 
341      octane-splay, octane-typescript, octane-zlib"/>
342
343  <target name="--single-process" unless="${octane-test-sys-prop.separate.process}">
344    <antcall target="octane-single-process"/>
345  </target>
346  <target name="--separate-process" if="${octane-test-sys-prop.separate.process}">
347    <antcall target="octane-separate-process"/>
348  </target>
349
350  <!-- run 'octane' in single or separate processes based on config -->
351  <target name="octane" depends="init, --single-process, --separate-process"/>
352
353  <!-- run octane benchmarks using octane as runtime -->
354  <target name="octane-v8" depends="octane-init">
355    <antcall target="run-octane-v8"/>
356  </target>
357
358  <!-- run octane benchmarks using Rhino as runtime -->
359  <target name="octane-rhino" depends="octane-init-rhino">
360    <antcall target="run-octane-rhino"/>
361  </target>
362  
363  <target name="run-octane">
364    <java classname="${nashorn.shell.tool}"
365          classpath="${run.test.classpath}"
366          fork="true"
367          dir=".">
368      <jvmarg line="${ext.class.path}"/>
369      <jvmarg line="${run.test.jvmargs.octane} -Xms${run.test.xms} -Xmx${run.test.xmx}"/>
370      <syspropertyset>
371        <propertyref prefix="nashorn."/>
372      </syspropertyset>
373      <arg value="${octane-test-sys-prop.test.js.framework}"/>
374      <arg value="-scripting"/>
375      <arg value="--"/>
376      <arg value="${octane-tests}"/>
377      <arg value="--runtime"/>
378      <arg value="Nashorn"/>
379      <arg value="--verbose"/>
380      <arg value="--iterations 10"/>
381    </java>
382  </target>
383
384  <target name="run-octane-v8">
385    <exec executable="${v8.shell}">
386      <arg value="${octane-test-sys-prop.test.js.framework}"/>
387      <arg value="--"/>
388      <arg value="${octane-tests}"/>      
389      <arg value="--runtime"/>
390      <arg value="v8"/>
391      <arg value="--verbose"/>
392      <arg value="--iterations 10"/>
393    </exec>
394  </target>
395
396  <target name="run-octane-rhino">
397    <java jar="${rhino.jar}"
398          classpath="${run.test.classpath}"
399          fork="true"
400          dir=".">
401      <jvmarg line="${run.test.jvmargs.octane} -Xms${run.test.xms} -Xmx${run.test.xmx}"/>
402      <arg value="-opt"/>
403      <arg value="9"/>
404      <arg value="${octane-test-sys-prop.test.js.framework}"/>
405      <arg value="${octane-tests}"/>
406      <arg value="--runtime"/>
407      <arg value="Rhino"/>
408      <arg value="--verbose"/>
409      <arg value="--iterations 10"/>
410    </java>
411  </target>
412
413  <!-- run octane with all known runtimes for comparison -->
414  <target name="octane-all" depends="octane, octane-v8, octane-rhino">
415    <exec executable="${v8.shell}">
416      <arg value="${octane-test-sys-prop.test.js.framework}"/>
417      <arg value="${octane-tests}/"/>
418    </exec>
419  </target>
420   
421  <target name="sunspider-init" depends="jar">
422    <fileset id="sunspider-set"
423	     dir="${sunspider-test-sys-prop.test.js.roots}"
424	     excludes="${sunspider-test-sys-prop.test.js.exclude.list}">
425      <include name="**/*.js"/>
426    </fileset>
427    <pathconvert pathsep=" " property="sunspider-tests" refid="sunspider-set"/>
428  </target>
429
430  <!-- run sunspider with Nashorn -->
431  <target name="sunspider" depends="sunspider-init">
432    <java classname="${nashorn.shell.tool}"
433          classpath="${run.test.classpath}"
434          fork="true"
435          dir=".">
436      <jvmarg line="${ext.class.path}"/>
437      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
438      <arg value="-timezone=PST"/>
439      <arg value="--class-cache-size=50"/>
440      <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
441      <arg value="--"/>
442      <arg value="${sunspider-tests}/"/>
443    </java>
444  </target>
445
446  <!-- run sunspider with v8 -->
447  <target name="sunspider-v8" depends="sunspider-init">
448    <exec executable="${v8.shell}">
449      <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
450      <arg value="--"/>
451      <arg value="${sunspider-tests}/"/>
452    </exec>
453  </target>
454
455  <!-- run sunspider with Rhino -->
456  <target name="sunspider-rhino" depends="sunspider-init">
457    <java jar="${rhino.jar}"
458          classpath="${run.test.classpath}"
459          fork="true"
460          dir=".">
461      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
462      <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
463      <arg value="${sunspider-tests}/"/>
464    </java>
465  </target>
466
467</project>
468