changeset 337:0ff1459dec27

Optimize forked integration tests (almost 2x improvement for integration testing times)
author shade
date Sat, 11 Jan 2014 00:38:53 +0400
parents 3b50d1b2260b
children 96d69d7ebcff
files jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/AnnotatedClassForkedTest.java jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/AnnotatedForked2_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmAppendPrependArgs1_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmAppendPrependArgs2_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmArgs1_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmArgs2_Test.java jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmArgs3_Test.java
diffstat 7 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/AnnotatedClassForkedTest.java	Sat Jan 11 00:38:03 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/AnnotatedClassForkedTest.java	Sat Jan 11 00:38:53 2014 +0400
@@ -75,6 +75,7 @@
         Options opt = new OptionsBuilder()
                 .include(Fixtures.getTestMask(this.getClass()))
                 .shouldFailOnError(true)
+                .forks(1)
                 .build();
         new Runner(opt).run();
     }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/AnnotatedForked2_Test.java	Sat Jan 11 00:38:03 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/AnnotatedForked2_Test.java	Sat Jan 11 00:38:53 2014 +0400
@@ -54,7 +54,7 @@
     @GenerateMicroBenchmark
     @Warmup(iterations = 0)
     @Measurement(iterations = 1, time = 100, timeUnit = TimeUnit.MILLISECONDS)
-    @Fork()
+    @Fork(1)
     public void test1() {
         Fixtures.work();
         test1executed = true;
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmAppendPrependArgs1_Test.java	Sat Jan 11 00:38:03 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmAppendPrependArgs1_Test.java	Sat Jan 11 00:38:53 2014 +0400
@@ -96,6 +96,7 @@
         Options opt = new OptionsBuilder()
                 .include(Fixtures.getTestMask(this.getClass()))
                 .shouldFailOnError(true)
+                .forks(1)
                 .build();
         new Runner(opt).run();
     }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmAppendPrependArgs2_Test.java	Sat Jan 11 00:38:03 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmAppendPrependArgs2_Test.java	Sat Jan 11 00:38:53 2014 +0400
@@ -117,6 +117,7 @@
         Options opt = new OptionsBuilder()
                 .include(Fixtures.getTestMask(this.getClass()))
                 .shouldFailOnError(true)
+                .forks(1)
                 .build();
         new Runner(opt).run();
     }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmArgs1_Test.java	Sat Jan 11 00:38:03 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmArgs1_Test.java	Sat Jan 11 00:38:53 2014 +0400
@@ -72,6 +72,7 @@
         Options opt = new OptionsBuilder()
                 .include(Fixtures.getTestMask(this.getClass()))
                 .shouldFailOnError(true)
+                .forks(1)
                 .build();
         new Runner(opt).run();
     }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmArgs2_Test.java	Sat Jan 11 00:38:03 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmArgs2_Test.java	Sat Jan 11 00:38:53 2014 +0400
@@ -96,6 +96,7 @@
         Options opt = new OptionsBuilder()
                 .include(Fixtures.getTestMask(this.getClass()))
                 .shouldFailOnError(true)
+                .forks(1)
                 .build();
         new Runner(opt).run();
     }
--- a/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmArgs3_Test.java	Sat Jan 11 00:38:03 2014 +0400
+++ b/jmh-core-it/src/test/java/org/openjdk/jmh/it/fork/ForkedJvmArgs3_Test.java	Sat Jan 11 00:38:53 2014 +0400
@@ -74,6 +74,7 @@
         Options opt = new OptionsBuilder()
                 .include(Fixtures.getTestMask(this.getClass()))
                 .shouldFailOnError(true)
+                .forks(1)
                 .build();
         new Runner(opt).run();
     }