1 /*
2 * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of Oracle nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
170 System.out.println(" -saveres "+
171 "Save the results to the indicated file");
172 System.out.println(" -appres "+
173 "Append the results to the indicated file");
174 System.out.println(" -title "+
175 "Use the title for the saved results");
176 System.out.println(" -desc "+
177 "Use the description for the saved results");
178 System.out.println(" -loop "+
179 "Loop for the specified duration"+
180 "\n "+
181 "Duration specified as :"+
182 "\n "+
183 "<days>d / <hours>h / <minutes>m / dd:hh:mm");
184 System.out.println(" -loopdef "+
185 "Loop for a default duration of 72 hours");
186
187 System.exit(exitcode);
188 }
189
190 public static void main(String argv[]) {
191 init();
192 TestEnvironment.init();
193 Result.init();
194
195 Destinations.init();
196 GraphicsTests.init();
197 RenderTests.init();
198 PixelTests.init();
199 ImageTests.init();
200 MiscTests.init();
201 TextTests.init();
202 TextRenderTests.init();
203 TextMeasureTests.init();
204 TextConstructionTests.init();
205 IIOTests.init();
206 CMMTests.init();
207
208 boolean gui = true;
209 boolean showresults = true;
210 boolean saveresults = true;
293 {
294 requiredLoopTime = 259200000; // 72 hrs * 60 * 60 * 1000
295 J2DBench.looping = true;
296 } else if (arg.equalsIgnoreCase("-loop")) {
297
298 if (++i >= argv.length) {
299 usage(1);
300 }
301
302 J2DBench.looping = true;
303
304 /*
305 * d or D -> Days
306 * h or H -> Hours
307 * m or M -> Minutes
308 * dd:hh:mm -> Days:Hours:Minutes
309 */
310
311 if (argv[i].indexOf(":") >= 0) {
312
313 String values[] = argv[i].split(":");
314 int intVals[] = new int[3];
315
316 for(int j=0; j<values.length; j++) {
317 try {
318 intVals[j] = Integer.parseInt(values[j]);
319 } catch(Exception e) {}
320 }
321
322 System.out.println("\nLoop for " + intVals[0] +
323 " days " + intVals[1] +
324 " hours and " + intVals[2] + " minutes.\n");
325
326 requiredLoopTime = ((intVals[0] * 24 * 60 * 60) +
327 (intVals[1] * 60 * 60) +
328 (intVals[2] * 60)) * 1000;
329
330 } else {
331
332 String type = argv[i].substring(argv[i].length() - 1);
333
334 int multiplyWith = 1;
|
1 /*
2 * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of Oracle nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
170 System.out.println(" -saveres "+
171 "Save the results to the indicated file");
172 System.out.println(" -appres "+
173 "Append the results to the indicated file");
174 System.out.println(" -title "+
175 "Use the title for the saved results");
176 System.out.println(" -desc "+
177 "Use the description for the saved results");
178 System.out.println(" -loop "+
179 "Loop for the specified duration"+
180 "\n "+
181 "Duration specified as :"+
182 "\n "+
183 "<days>d / <hours>h / <minutes>m / dd:hh:mm");
184 System.out.println(" -loopdef "+
185 "Loop for a default duration of 72 hours");
186
187 System.exit(exitcode);
188 }
189
190 public static void main(String[] argv) {
191 init();
192 TestEnvironment.init();
193 Result.init();
194
195 Destinations.init();
196 GraphicsTests.init();
197 RenderTests.init();
198 PixelTests.init();
199 ImageTests.init();
200 MiscTests.init();
201 TextTests.init();
202 TextRenderTests.init();
203 TextMeasureTests.init();
204 TextConstructionTests.init();
205 IIOTests.init();
206 CMMTests.init();
207
208 boolean gui = true;
209 boolean showresults = true;
210 boolean saveresults = true;
293 {
294 requiredLoopTime = 259200000; // 72 hrs * 60 * 60 * 1000
295 J2DBench.looping = true;
296 } else if (arg.equalsIgnoreCase("-loop")) {
297
298 if (++i >= argv.length) {
299 usage(1);
300 }
301
302 J2DBench.looping = true;
303
304 /*
305 * d or D -> Days
306 * h or H -> Hours
307 * m or M -> Minutes
308 * dd:hh:mm -> Days:Hours:Minutes
309 */
310
311 if (argv[i].indexOf(":") >= 0) {
312
313 String[] values = argv[i].split(":");
314 int[] intVals = new int[3];
315
316 for(int j=0; j<values.length; j++) {
317 try {
318 intVals[j] = Integer.parseInt(values[j]);
319 } catch(Exception e) {}
320 }
321
322 System.out.println("\nLoop for " + intVals[0] +
323 " days " + intVals[1] +
324 " hours and " + intVals[2] + " minutes.\n");
325
326 requiredLoopTime = ((intVals[0] * 24 * 60 * 60) +
327 (intVals[1] * 60 * 60) +
328 (intVals[2] * 60)) * 1000;
329
330 } else {
331
332 String type = argv[i].substring(argv[i].length() - 1);
333
334 int multiplyWith = 1;
|