aboutsummaryrefslogtreecommitdiff
path: root/test/src/jdk/nashorn/internal/performance/OctaneTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/jdk/nashorn/internal/performance/OctaneTest.java')
-rw-r--r--test/src/jdk/nashorn/internal/performance/OctaneTest.java28
1 files changed, 20 insertions, 8 deletions
diff --git a/test/src/jdk/nashorn/internal/performance/OctaneTest.java b/test/src/jdk/nashorn/internal/performance/OctaneTest.java
index 7e402c65..102ffc1a 100644
--- a/test/src/jdk/nashorn/internal/performance/OctaneTest.java
+++ b/test/src/jdk/nashorn/internal/performance/OctaneTest.java
@@ -40,6 +40,7 @@ import java.text.NumberFormat;
import java.util.List;
import org.testng.annotations.Test;
+@SuppressWarnings("javadoc")
public class OctaneTest {
@Test
@@ -72,7 +73,7 @@ public class OctaneTest {
genericTest("GBEMU");
}
- /* @Test
+/* @Test
public void mandreelTest() {
genericTest("Mandreel");
}*/
@@ -107,11 +108,21 @@ public class OctaneTest {
genericTest("Splay");
}
+ @Test
+/* public void typeScriptTest() {
+ genericTest("TypeScript");
+ }
+
+ @Test
+ public void zlibTest() {
+ genericTest("zlib");
+ }/*/
+
public void genericTest(final String benchmark) {
try {
final String mainScript = "test/script/basic/run-octane.js";
- final String benchmarkScript = "test/script/external/octane/benchmarks/"+benchmark.toLowerCase() + ".js";
- String[] args = {
+ final String benchmarkScript = "test/script/external/octane/benchmarks/" + benchmark.toLowerCase() + ".js";
+ final String[] args = {
"--",
benchmarkScript,
"--verbose"
@@ -136,16 +147,17 @@ public class OctaneTest {
}
}
- public Double genericNashornTest(final String benchmark, final String testPath, String[] args) throws Throwable {
+ public Double genericNashornTest(final String benchmark, final String testPath, final String[] args) throws Throwable {
try {
final PerformanceWrapper wrapper = new PerformanceWrapper();
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final PrintStream ps = new PrintStream(baos);
- java.io.File test=new java.io.File(testPath);
- File absoluteFile=test.getAbsoluteFile();
+ final java.io.File test=new java.io.File(testPath);
+ final File absoluteFile=test.getAbsoluteFile();
@SuppressWarnings("deprecation")
+ final
URL testURL=absoluteFile.toURL();
wrapper.runExecuteOnlyTest(testPath, 0, 0, testURL.toString(), ps, System.err, args);
@@ -153,7 +165,7 @@ public class OctaneTest {
final byte[] output = baos.toByteArray();
final List<String> result = outputToStrings(output);
- Double _result = filterBenchmark(result, benchmark);
+ final Double _result = filterBenchmark(result, benchmark);
return _result;
} catch (final Throwable e) {
@@ -265,7 +277,7 @@ public class OctaneTest {
if (v8 != null && rhino != 0) {
nashornToV8 = nashorn.doubleValue() / v8.doubleValue();
}
- String normalizedBenchmark=benchmark.replace("-", "");
+ final String normalizedBenchmark=benchmark.replace("-", "");
System.out.println("benchmark-" + normalizedBenchmark + "-nashorn=" + nashorn);
AuroraWrapper.addResults(AuroraWrapper.createOrOpenDocument(), "benchmark-" + normalizedBenchmark + "-nashorn", nashorn.toString());