build-benchmark.xml revision 20:a7f177d6639c
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    <fileset id="octane-set"
28	     dir="${octane-test-sys-prop.test.js.roots}"
29	     excludes="${octane-test-sys-prop.test.js.exclude.list}">
30      <include name="*.js"/>
31    </fileset>
32    <pathconvert pathsep=" " property="octane-tests" refid="octane-set"/>
33    <property name="extra-arg" value=""/>
34  </target>
35
36  <!-- box2d -->
37  <target name="box2d-init">
38    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/box2d.js"/>
39  </target>
40
41  <target name="octane-box2d" depends="jar, box2d-init, octane-verbose">
42    <antcall target="run-octane"/>
43  </target>
44
45  <target name="octane-box2d-v8" depends="jar, box2d-init, octane-verbose">
46    <antcall target="run-octane-v8"/>
47  </target>
48
49  <target name="octane-box2d-rhino" depends="jar, box2d-init, octane-verbose">
50    <antcall target="run-octane-rhino"/>
51  </target>
52
53  <!-- code-load -->  
54  <target name="code-load-init">
55    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/code-load.js"/>
56  </target>
57
58  <target name="octane-code-load" depends="jar, code-load-init, octane-verbose">
59    <antcall target="run-octane"/>
60  </target>
61
62  <target name="octane-code-load-v8" depends="jar, code-load-init, octane-verbose">
63    <antcall target="run-octane-v8"/>
64  </target>
65
66  <target name="octane-code-load-rhino" depends="jar, code-load-init, octane-verbose">
67    <antcall target="run-octane-rhino"/>
68  </target>
69
70  <!-- crypto -->
71  <target name="crypto-init">
72    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/crypto.js"/>
73  </target>
74
75  <target name="octane-crypto" depends="jar, crypto-init, octane-verbose">
76    <antcall target="run-octane"/>
77  </target>
78
79  <target name="octane-crypto-v8" depends="jar, crypto-init, octane-verbose">
80    <antcall target="run-octane-v8"/>
81  </target>
82
83  <target name="octane-crypto-rhino" depends="jar, crypto-init, octane-verbose">
84    <antcall target="run-octane-rhino"/>
85  </target>
86
87  <!-- deltablue -->
88  <target name="deltablue-init">
89    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/deltablue.js"/>
90  </target>
91
92  <target name="octane-deltablue" depends="jar, deltablue-init, octane-verbose">
93    <antcall target="run-octane"/>
94  </target>
95
96  <target name="octane-deltablue-v8" depends="jar, deltablue-init, octane-verbose">
97    <antcall target="run-octane-v8"/>
98  </target>
99
100  <target name="octane-deltablue-rhino" depends="jar, deltablue-init, octane-verbose">
101    <antcall target="run-octane-rhino"/>
102  </target>
103
104  <!-- earley-boyer -->
105  <target name="earley-boyer-init">
106    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/earley-boyer.js"/>
107  </target>
108
109  <target name="octane-earley-boyer" depends="jar, earley-boyer-init, octane-verbose">
110    <antcall target="run-octane"/>
111  </target>
112
113  <target name="octane-earley-boyer-v8" depends="jar, earley-boyer-init, octane-verbose">
114    <antcall target="run-octane-v8"/>
115  </target>
116
117  <target name="octane-earley-boyer-rhino" depends="jar, earley-boyer-init, octane-verbose">
118    <antcall target="run-octane-rhino"/>
119  </target>
120
121  <!-- gbemu -->  
122  <target name="gbemu-init">
123    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/gbemu.js"/>
124  </target>
125
126  <target name="octane-gbemu" depends="jar, gbemu-init, octane-verbose">
127    <antcall target="run-octane"/>
128  </target>
129
130  <target name="octane-gbemu-v8" depends="jar, gbemu-init, octane-verbose">
131    <antcall target="run-octane-v8"/>
132  </target>
133
134  <target name="octane-gbemu-rhino" depends="jar, gbemu-init, octane-verbose">
135    <antcall target="run-octane-rhino"/>
136  </target>
137
138  <!-- navier-stokes -->
139  <target name="navier-stokes-init">
140    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/navier-stokes.js"/>
141  </target>
142
143  <target name="octane-navier-stokes" depends="jar, navier-stokes-init, octane-verbose">
144    <antcall target="run-octane"/>
145  </target>
146
147  <target name="octane-navier-stokes-v8" depends="jar, navier-stokes-init, octane-verbose">
148    <antcall target="run-octane-v8"/>
149  </target>
150
151  <target name="octane-navier-stokes-rhino" depends="jar, navier-stokes-init, octane-verbose">
152    <antcall target="run-octane-rhino"/>
153  </target>
154
155  <!-- pdfjs -->  
156  <target name="pdfjs-init">
157    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/pdfjs.js"/>
158  </target>
159
160  <target name="octane-pdfjs" depends="jar, pdfjs-init, octane-verbose">
161    <antcall target="run-octane"/>
162  </target>
163
164  <target name="octane-pdfjs-v8" depends="jar, pdfjs-init, octane-verbose">
165    <antcall target="run-octane-v8"/>
166  </target>
167
168  <target name="octane-pdfjs-rhino" depends="jar, pdfjs-init, octane-verbose">
169    <antcall target="run-octane-rhino"/>
170  </target>
171
172  <!-- raytrace -->
173  <target name="raytrace-init">
174    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/raytrace.js"/>
175  </target>
176
177  <target name="octane-raytrace" depends="jar, raytrace-init, octane-verbose">
178    <antcall target="run-octane"/>
179  </target>
180
181  <target name="octane-raytrace-v8" depends="jar, raytrace-init, octane-verbose">
182    <antcall target="run-octane-v8"/>
183  </target>
184
185  <target name="octane-raytrace-rhino" depends="jar, raytrace-init, octane-verbose">
186    <antcall target="run-octane-rhino"/>
187  </target>
188
189  <!-- regexp -->
190  <target name="regexp-init">
191    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/regexp.js"/>
192  </target>
193
194  <target name="octane-regexp" depends="jar, regexp-init, octane-verbose">
195    <antcall target="run-octane"/>
196  </target>
197
198  <target name="octane-regexp-octane-v8" depends="jar, regexp-init, octane-verbose">
199    <antcall target="run-octane-v8"/>
200  </target>
201
202  <target name="octane-regexp-rhino" depends="jar, regexp-init, octane-verbose">
203    <antcall target="run-octane-rhino"/>
204  </target>
205
206
207  <!-- splay -->
208  <target name="splay-init">
209    <property name="octane-tests" value="${octane-test-sys-prop.test.js.roots}/splay.js"/>
210  </target>
211
212  <target name="octane-splay" depends="jar, splay-init, octane-verbose">
213    <antcall target="run-octane"/>
214  </target>
215
216  <target name="octane-splay-v8" depends="jar, splay-init, octane-verbose">
217    <antcall target="run-octane-v8"/>
218  </target>
219
220  <target name="octane-splay-rhino" depends="jar, splay-init, octane-verbose">
221    <antcall target="run-octane-rhino"/>
222  </target>
223
224  <target name="octane-verbose">
225    <property name="extra-arg" value="--verbose"/>
226  </target>
227
228  <!-- run octane benchmarks using Nashorn as runtime -->
229  <target name="octane" depends="octane-init">
230    <antcall target="run-octane"/>
231  </target>
232
233  <!-- run octane benchmarks using octane as runtime -->
234  <target name="octane-v8" depends="octane-init">
235    <antcall target="run-octane-v8"/>
236  </target>
237
238  <!-- run octane benchmarks using Rhino as runtime -->
239  <target name="octane-rhino" depends="octane-init">
240    <antcall target="run-octane-rhino"/>
241  </target>
242  
243  <target name="run-octane">
244    <java classname="${nashorn.shell.tool}"
245          classpath="${run.test.classpath}"
246          fork="true"
247          dir=".">
248      <jvmarg line="${ext.class.path}"/>
249      <jvmarg line="${run.test.jvmargs.octane}"/>
250      <arg value="${octane-test-sys-prop.test.js.framework}"/>
251      <arg value="--"/>
252      <arg value="${octane-tests}"/>
253      <arg value="--runtime"/>
254      <arg value="Nashorn"/>
255      <arg value="--verbose"/>
256      <arg value="--iterations 8"/>
257      <arg value="${extra-arg}"/>
258    </java>
259  </target>
260
261  <target name="run-octane-v8">
262    <exec executable="${v8.shell}">
263      <arg value="${octane-test-sys-prop.test.js.framework}"/>
264      <arg value="--"/>
265      <arg value="${octane-tests}"/>      
266      <arg value="--runtime"/>
267      <arg value="v8"/>
268      <arg value="--verbose"/>
269      <arg value="--iterations 8"/>
270      <arg value="${extra-arg}"/>
271    </exec>
272  </target>
273
274  <target name="run-octane-rhino">
275    <java jar="${rhino.jar}"
276          classpath="${run.test.classpath}"
277          fork="true"
278          dir=".">
279      <jvmarg line="${run.test.jvmargs.octane}"/>
280      <arg value="${octane-test-sys-prop.test.js.framework}"/>
281      <arg value="${octane-tests}"/>
282      <arg value="--runtime"/>
283      <arg value="Rhino"/>
284      <arg value="--verbose"/>
285      <arg value="--iterations 8"/>
286      <arg value="${extra-arg}"/>
287    </java>
288  </target>
289
290  <!-- run octane with all known runtimes for comparison -->
291  <target name="octane-all" depends="octane, octane-v8, octane-rhino">
292    <exec executable="${v8.shell}">
293      <arg value="${octane-test-sys-prop.test.js.framework}"/>
294      <arg value="${octane-tests}/"/>
295    </exec>
296  </target>
297   
298  <target name="sunspider-init" depends="jar">
299    <fileset id="sunspider-set"
300	     dir="${sunspider-test-sys-prop.test.js.roots}"
301	     excludes="${sunspider-test-sys-prop.test.js.exclude.list}">
302      <include name="**/*.js"/>
303    </fileset>
304    <pathconvert pathsep=" " property="sunspider-tests" refid="sunspider-set"/>
305  </target>
306
307  <!-- run sunspider with Nashorn -->
308  <target name="sunspider" depends="sunspider-init">
309    <java classname="${nashorn.shell.tool}"
310          classpath="${run.test.classpath}"
311          fork="true"
312          dir=".">
313      <jvmarg line="${ext.class.path}"/>
314      <jvmarg line="${run.test.jvmargs}"/>
315      <arg value="-timezone=PST"/>
316      <arg value="--class-cache-size=50"/>
317      <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
318      <arg value="--"/>
319      <arg value="${sunspider-tests}/"/>
320    </java>
321  </target>
322
323  <!-- run sunspider with v8 -->
324  <target name="sunspider-v8" depends="sunspider-init">
325    <exec executable="${v8.shell}">
326      <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
327      <arg value="--"/>
328      <arg value="${sunspider-tests}/"/>
329    </exec>
330  </target>
331
332  <!-- run sunspider with Rhino -->
333  <target name="sunspider-rhino" depends="sunspider-init">
334    <java jar="${rhino.jar}"
335          classpath="${run.test.classpath}"
336          fork="true"
337          dir=".">
338      <jvmarg line="${run.test.jvmargs}"/>
339      <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
340      <arg value="${sunspider-tests}/"/>
341    </java>
342  </target>
343
344</project>
345