diff --git a/src/main/java/teetime/variant/methodcall/framework/core/AbstractStage.java b/src/main/java/teetime/variant/methodcall/framework/core/AbstractStage.java index 3fa3175e408bebe82ed7bfb024b1350c2f241d9d..1d55b0bac70b1e9056064ce16d898d962b97af3b 100644 --- a/src/main/java/teetime/variant/methodcall/framework/core/AbstractStage.java +++ b/src/main/java/teetime/variant/methodcall/framework/core/AbstractStage.java @@ -9,8 +9,6 @@ public abstract class AbstractStage<I, O> implements Stage<I, O> { private Stage<?, ?> parentStage; - private int index; - private Stage<?, ?> successor; private boolean reschedulable; @@ -73,7 +71,6 @@ public abstract class AbstractStage<I, O> implements Stage<I, O> { @Override public void setParentStage(final Stage<?, ?> parentStage, final int index) { - this.index = index; this.parentStage = parentStage; } diff --git a/src/main/java/teetime/variant/methodcall/framework/core/Pipeline.java b/src/main/java/teetime/variant/methodcall/framework/core/Pipeline.java index 0309da6eea3ef6de3722c1171739c6a1bfa49236..57dcbbad5914469b13c373920d47f57d52ed1be5 100644 --- a/src/main/java/teetime/variant/methodcall/framework/core/Pipeline.java +++ b/src/main/java/teetime/variant/methodcall/framework/core/Pipeline.java @@ -142,13 +142,13 @@ public class Pipeline<I, O> implements Stage<I, O> { throw new IllegalStateException(); } + public void setReschedulable(final boolean reschedulable) { + this.reschedulable = reschedulable; + } + @Override public boolean isReschedulable() { return this.reschedulable; } - public void setReschedulable(final boolean reschedulable) { - this.reschedulable = reschedulable; - } - } diff --git a/src/main/java/teetime/variant/methodcall/framework/core/Stage.java b/src/main/java/teetime/variant/methodcall/framework/core/Stage.java index c891435007609996456a2c6aa35500b6cfa2f99a..2ab689b1869ac2c02f801a9de6f70861a29ccadb 100644 --- a/src/main/java/teetime/variant/methodcall/framework/core/Stage.java +++ b/src/main/java/teetime/variant/methodcall/framework/core/Stage.java @@ -24,6 +24,11 @@ public interface Stage<I, O> { void setSuccessor(Stage<? super O, ?> successor); + /** + * Used for execute4() (experiment02) + * + * @return + */ boolean isReschedulable(); void onIsPipelineHead(); diff --git a/src/main/java/teetime/variant/methodcall/stage/EndStage.java b/src/main/java/teetime/variant/methodcall/stage/EndStage.java index dc791a4465e29b11176e53962aab354482c68347..eccd922a682a1207341d243e2d753edf90effdbb 100644 --- a/src/main/java/teetime/variant/methodcall/stage/EndStage.java +++ b/src/main/java/teetime/variant/methodcall/stage/EndStage.java @@ -15,7 +15,7 @@ public class EndStage<T> implements Stage<T, T> { @Override public T execute(final Object element) { - return null; + throw new IllegalStateException(); } @Override @@ -43,7 +43,6 @@ public class EndStage<T> implements Stage<T, T> { @Override public Stage next() { - // TODO Auto-generated method stub return null; } @@ -53,11 +52,6 @@ public class EndStage<T> implements Stage<T, T> { } - @Override - public boolean isReschedulable() { - return false; - } - @Override public void onStart() { // TODO Auto-generated method stub @@ -66,8 +60,12 @@ public class EndStage<T> implements Stage<T, T> { @Override public Object executeRecursively(final Object element) { - // TODO Auto-generated method stub - return null; + return element; + } + + @Override + public boolean isReschedulable() { + return false; } } diff --git a/src/main/java/teetime/variant/methodcall/stage/ObjectProducer.java b/src/main/java/teetime/variant/methodcall/stage/ObjectProducer.java index 0a50a69d9a45057d2e57b89e08ade0dcf03d3d62..540a81da2c2e4acc17dcd59a3be3c9b52cdd5aeb 100644 --- a/src/main/java/teetime/variant/methodcall/stage/ObjectProducer.java +++ b/src/main/java/teetime/variant/methodcall/stage/ObjectProducer.java @@ -39,20 +39,15 @@ public class ObjectProducer<T> extends ProducerStage<Void, T> { @Override public T execute(final Object element) { - // if (this.numInputObjects == 0) { - // // this.setReschedulable(false); - // return null; - // } + if (this.numInputObjects == 0) { + return null; + } try { final T newObject = this.inputObjectCreator.create(); // final T newObject = null; this.numInputObjects--; - if (this.numInputObjects == 0) { - this.setReschedulable(false); - } - return newObject; } catch (final Exception e) { throw new IllegalStateException(e); diff --git a/src/test/java/kieker/analysis/examples/throughput/ThroughputTimestampAnalysisTest.java b/src/test/java/kieker/analysis/examples/throughput/ThroughputTimestampAnalysisTest.java index 8e5aa3e2ce5c01c95f3a151db7315fa0b20b9c66..e64266edd759091a2a917799994e0824b139e3a2 100644 --- a/src/test/java/kieker/analysis/examples/throughput/ThroughputTimestampAnalysisTest.java +++ b/src/test/java/kieker/analysis/examples/throughput/ThroughputTimestampAnalysisTest.java @@ -19,32 +19,22 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; -import kieker.analysis.examples.ThroughputTimestampAnalysis; -import kieker.analysis.exception.AnalysisConfigurationException; -import kieker.common.logging.LogFactory; - -import org.junit.Before; import org.junit.Test; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; +import test.PerformanceTest; +import kieker.analysis.examples.ThroughputTimestampAnalysis; +import kieker.analysis.exception.AnalysisConfigurationException; /** * @author Nils Christian Ehmke - * + * * @since 1.10 */ -public class ThroughputTimestampAnalysisTest { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class ThroughputTimestampAnalysisTest extends PerformanceTest { @Test public void testWithManyObjects() throws IllegalStateException, AnalysisConfigurationException { diff --git a/src/test/java/teetime/variant/explicitScheduling/examples/throughput/ThroughputAnalysisTest.java b/src/test/java/teetime/variant/explicitScheduling/examples/throughput/ThroughputAnalysisTest.java index cadace425879ddc3017bb34d36dfe106a25bc7e0..677abf645370849ea396ced8973c0cd5b70c7679 100644 --- a/src/test/java/teetime/variant/explicitScheduling/examples/throughput/ThroughputAnalysisTest.java +++ b/src/test/java/teetime/variant/explicitScheduling/examples/throughput/ThroughputAnalysisTest.java @@ -17,29 +17,20 @@ package teetime.variant.explicitScheduling.examples.throughput; import java.util.concurrent.Callable; -import kieker.common.logging.LogFactory; - -import org.junit.Before; import org.junit.Test; import teetime.util.StopWatch; -import teetime.variant.explicitScheduling.examples.throughput.ThroughputAnalysis; +import test.PerformanceTest; /** * @author Christian Wulf - * + * * @since 1.10 */ -public class ThroughputAnalysisTest { +public class ThroughputAnalysisTest extends PerformanceTest { - private static final int NUM_OBJECTS_TO_CREATE = 100000; private static final int numRuns = 2; - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } - @Test public void testWithMultipleRuns() { final StopWatch stopWatch = new StopWatch(); diff --git a/src/test/java/teetime/variant/explicitScheduling/examples/throughput/ThroughputTimestampAnalysisTest.java b/src/test/java/teetime/variant/explicitScheduling/examples/throughput/ThroughputTimestampAnalysisTest.java index 96f0aac2b8dd8654add1281f614c7bf4a123ae28..998a447ab710f9dd37c7e6a6375373beb73dd32c 100644 --- a/src/test/java/teetime/variant/explicitScheduling/examples/throughput/ThroughputTimestampAnalysisTest.java +++ b/src/test/java/teetime/variant/explicitScheduling/examples/throughput/ThroughputTimestampAnalysisTest.java @@ -19,30 +19,18 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; -import org.junit.Before; import org.junit.Test; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; -import teetime.variant.explicitScheduling.examples.throughput.ThroughputTimestampAnalysis; -import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class ThroughputTimestampAnalysisTest { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class ThroughputTimestampAnalysisTest extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java b/src/test/java/teetime/variant/methodcall/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java index 362f34266427a231601b440e126ecc89bf4c8c8a..aa1b32ab88f514b2a2d5a585ba4c46501e2792d8 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcall.examples.experiment01; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis1Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis1Test extends PerformanceTest { // 500 times faster than our new framework // TODO check why diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment01/MethodCallThroughputAnalysis1.java b/src/test/java/teetime/variant/methodcall/examples/experiment01/MethodCallThroughputAnalysis1.java index f5a71bf9a6fbfd0ef7319a194ce755fc6677f88b..aac7fca2481b15bbcad3937d493364e6e009fc72 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment01/MethodCallThroughputAnalysis1.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment01/MethodCallThroughputAnalysis1.java @@ -65,12 +65,10 @@ public class MethodCallThroughputAnalysis1 extends Analysis { @Override public void run() { while (true) { - if (!objectProducer.isReschedulable()) { + TimestampObject object = objectProducer.execute(null); + if (object == null) { return; } - TimestampObject object = objectProducer.execute(null); - // if (object == null) - // return; object = startTimestampFilter.execute(object); for (final NoopFilter<TimestampObject> noopFilter : noopFilters) { diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment02/MethodCallThoughputTimestampAnalysis2Test.java b/src/test/java/teetime/variant/methodcall/examples/experiment02/MethodCallThoughputTimestampAnalysis2Test.java index 52a5cb25d83377bfa2353ed7470d3460f7aba92a..08bb696740bf5979054b51219e8424a1b6cc1417 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment02/MethodCallThoughputTimestampAnalysis2Test.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment02/MethodCallThoughputTimestampAnalysis2Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcall.examples.experiment02; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis2Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis2Test extends PerformanceTest { // 500 times faster than our new framework // TODO check why diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment03/MethodCallThoughputTimestampAnalysis3Test.java b/src/test/java/teetime/variant/methodcall/examples/experiment03/MethodCallThoughputTimestampAnalysis3Test.java index 0364bc936f47326c41156f40c4a23092993dca32..65020939db10f8bb7f2d8a6259a3cc3d5462d881 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment03/MethodCallThoughputTimestampAnalysis3Test.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment03/MethodCallThoughputTimestampAnalysis3Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcall.examples.experiment03; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis3Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis3Test extends PerformanceTest { // 500 times faster than our new framework // TODO check why diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment04/MethodCallThoughputTimestampAnalysis4Test.java b/src/test/java/teetime/variant/methodcall/examples/experiment04/MethodCallThoughputTimestampAnalysis4Test.java index c6b509c36acb49082a2e3ea248aed401317ace93..a1adcac9acfb0f643c6c9db704852fc2cc93dca9 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment04/MethodCallThoughputTimestampAnalysis4Test.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment04/MethodCallThoughputTimestampAnalysis4Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcall.examples.experiment04; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis4Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis4Test extends PerformanceTest { // 500 times faster than our new framework // TODO check why diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment05/MethodCallThroughputAnalysis5.java b/src/test/java/teetime/variant/methodcall/examples/experiment05/MethodCallThroughputAnalysis5.java index 503eadeffa7d2036bd6c2ccf09b450af96050477..176f09efed5c06a6dbb5fb2ccb4102c70debf9d9 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment05/MethodCallThroughputAnalysis5.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment05/MethodCallThroughputAnalysis5.java @@ -58,8 +58,8 @@ public class MethodCallThroughputAnalysis5 extends Analysis { * @param numNoopFilters * @since 1.10 */ + @SuppressWarnings({ "rawtypes", "unchecked" }) private Runnable buildPipeline() { - @SuppressWarnings("unchecked") final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters]; // create stages final ObjectProducer<TimestampObject> objectProducer = new ObjectProducer<TimestampObject>(this.numInputObjects, this.inputObjectCreator); diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment06/MethodCallThoughputTimestampAnalysis6Test.java b/src/test/java/teetime/variant/methodcall/examples/experiment06/MethodCallThoughputTimestampAnalysis6Test.java index d1e00ef9899ee57ede5d22e2396519a3619624c4..126742c2ef55bdc15378e367a2c92632226692dd 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment06/MethodCallThoughputTimestampAnalysis6Test.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment06/MethodCallThoughputTimestampAnalysis6Test.java @@ -18,33 +18,20 @@ package teetime.variant.methodcall.examples.experiment06; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis6Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } - - // 500 times faster than our new framework - // TODO check why +public class MethodCallThoughputTimestampAnalysis6Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment07/MethodCallThoughputTimestampAnalysis7Test.java b/src/test/java/teetime/variant/methodcall/examples/experiment07/MethodCallThoughputTimestampAnalysis7Test.java index 729150eb44888b10837431a11713b5a782342d3e..050d96d4f81bddebfd11105debc31d8d6f6dfba9 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment07/MethodCallThoughputTimestampAnalysis7Test.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment07/MethodCallThoughputTimestampAnalysis7Test.java @@ -18,33 +18,20 @@ package teetime.variant.methodcall.examples.experiment07; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis7Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } - - // 500 times faster than our new framework - // TODO check why +public class MethodCallThoughputTimestampAnalysis7Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment07/MethodCallThroughputAnalysis7.java b/src/test/java/teetime/variant/methodcall/examples/experiment07/MethodCallThroughputAnalysis7.java index 9b11230f296c5aec88f9df148ab99238da75d2eb..29f51446d230e3478c75dc4315d9ac7f0651d872 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment07/MethodCallThroughputAnalysis7.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment07/MethodCallThroughputAnalysis7.java @@ -58,6 +58,7 @@ public class MethodCallThroughputAnalysis7 extends Analysis { * @param numNoopFilters * @since 1.10 */ + @SuppressWarnings("rawtypes") private Runnable buildPipeline() { @SuppressWarnings("unchecked") final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters]; diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment08/MethodCallThoughputTimestampAnalysis8Test.java b/src/test/java/teetime/variant/methodcall/examples/experiment08/MethodCallThoughputTimestampAnalysis8Test.java index 2dac38f163eeeed3773e0e5e4ee5c59089eee8c0..8ab1b3d89038e9d1ea21c099ac6112f6816c6cd3 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment08/MethodCallThoughputTimestampAnalysis8Test.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment08/MethodCallThoughputTimestampAnalysis8Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcall.examples.experiment08; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis8Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis8Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment12/MethodCallThoughputTimestampAnalysis12Test.java b/src/test/java/teetime/variant/methodcall/examples/experiment12/MethodCallThoughputTimestampAnalysis12Test.java index 2af8e47629770e0d139c706baa4a280495b79b4e..c6fe784eab61434021090b0e2a5555f657bc346e 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment12/MethodCallThoughputTimestampAnalysis12Test.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment12/MethodCallThoughputTimestampAnalysis12Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcall.examples.experiment12; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis12Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis12Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment13/MethodCallThoughputTimestampAnalysis13Test.java b/src/test/java/teetime/variant/methodcall/examples/experiment13/MethodCallThoughputTimestampAnalysis13Test.java index ccc148c124dfb67d48f7e0054462b2f1912468d8..05449afb7084d89915fab6ca3e5bafe95ddaf85b 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment13/MethodCallThoughputTimestampAnalysis13Test.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment13/MethodCallThoughputTimestampAnalysis13Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcall.examples.experiment13; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis13Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis13Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcall/examples/experiment13/MethodCallThroughputAnalysis13.java b/src/test/java/teetime/variant/methodcall/examples/experiment13/MethodCallThroughputAnalysis13.java index 2795e3bdc7a67d466801bb32a068eed6c8dec725..edd8b95ebf3acfb59ce3556639a406df33d4d2e1 100644 --- a/src/test/java/teetime/variant/methodcall/examples/experiment13/MethodCallThroughputAnalysis13.java +++ b/src/test/java/teetime/variant/methodcall/examples/experiment13/MethodCallThroughputAnalysis13.java @@ -60,8 +60,8 @@ public class MethodCallThroughputAnalysis13 extends Analysis { * @param numNoopFilters * @since 1.10 */ + @SuppressWarnings({ "rawtypes", "unchecked" }) private Runnable buildPipeline() { - @SuppressWarnings("unchecked") final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters]; // create stages final ObjectProducer<TimestampObject> objectProducer = new ObjectProducer<TimestampObject>(this.numInputObjects, this.inputObjectCreator); @@ -89,11 +89,10 @@ public class MethodCallThroughputAnalysis13 extends Analysis { stages[stages.length - 1].setSuccessor(new EndStage<Object>()); final WrappingPipeline pipeline = new WrappingPipeline() { - private int startIndex; - @Override public boolean execute() { - return stages[0].executeRecursively(null) != null; + Object result = stages[0].executeRecursively(null); + return result != null; } }; diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment09/MethodCallThoughputTimestampAnalysis9Test.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment09/MethodCallThoughputTimestampAnalysis9Test.java index a0aa656b5c18f0fe7afe7eb973928c6c693f2d49..431e58967051a12d1c86e4e35a90698960f4412c 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment09/MethodCallThoughputTimestampAnalysis9Test.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment09/MethodCallThoughputTimestampAnalysis9Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcallWithPorts.examples.experiment09; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis9Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis9Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment10/MethodCallThoughputTimestampAnalysis10Test.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment10/MethodCallThoughputTimestampAnalysis10Test.java index 16d44a2613a4b3a6661028442b5637c17dba4e13..d7a804aa08da090b222754e8ea46d02c5bb8b079 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment10/MethodCallThoughputTimestampAnalysis10Test.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment10/MethodCallThoughputTimestampAnalysis10Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcallWithPorts.examples.experiment10; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis10Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis10Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java index a6f76d0071ef07c9399caf0869920e0b384d8211..4cd04b305aa684d37e08ff0de492fac2f9cc6c7b 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcallWithPorts.examples.experiment11; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis11Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis11Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment14/MethodCallThoughputTimestampAnalysis14Test.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment14/MethodCallThoughputTimestampAnalysis14Test.java index 3a8ccedb450960a82346a323b4269e177f5b415d..18a9e2a3ba0aba9689289f483ab04f0a643d492f 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment14/MethodCallThoughputTimestampAnalysis14Test.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment14/MethodCallThoughputTimestampAnalysis14Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcallWithPorts.examples.experiment14; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis14Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis14Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java index 9e7c230ca071337af2d92ad441bd6ca6cc9af1d4..0d0149f17ba2249120a21600656ec0a212fbe685 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java @@ -18,30 +18,20 @@ package teetime.variant.methodcallWithPorts.examples.experiment15; import java.util.ArrayList; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis15Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis15Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java index e3afce1eb4ddcb1b5aebcf4a11e05833028796aa..24938afade7d8bcf65147463a2379c3a3eee1bb7 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java @@ -17,7 +17,6 @@ package teetime.variant.methodcallWithPorts.examples.experiment16; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; @@ -25,23 +24,14 @@ import teetime.util.ListUtil; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis16Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis16Test extends PerformanceTest { @Test public void testWithManyObjectsAnd1Thread() { diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java index c5f9ac19df56034664fe55fffed55ab20a590dbd..315b3b57eaa4cc4d140c0ba5aed16c1ae41fcd0b 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java @@ -17,7 +17,6 @@ package teetime.variant.methodcallWithPorts.examples.experiment17; import java.util.List; -import org.junit.Before; import org.junit.Test; import teetime.util.ConstructorClosure; @@ -25,23 +24,14 @@ import teetime.util.ListUtil; import teetime.util.StatisticsUtil; import teetime.util.StopWatch; import teetime.variant.explicitScheduling.examples.throughput.TimestampObject; - -import kieker.common.logging.LogFactory; +import test.PerformanceTest; /** * @author Christian Wulf * * @since 1.10 */ -public class MethodCallThoughputTimestampAnalysis17Test { - - private static final int NUM_OBJECTS_TO_CREATE = 100000; - private static final int NUM_NOOP_FILTERS = 800; - - @Before - public void before() { - System.setProperty(LogFactory.CUSTOM_LOGGER_JVM, "NONE"); - } +public class MethodCallThoughputTimestampAnalysis17Test extends PerformanceTest { @Test public void testWithManyObjects() { diff --git a/src/test/java/test/MeasurementRepository.java b/src/test/java/test/MeasurementRepository.java new file mode 100644 index 0000000000000000000000000000000000000000..03d1219a547f1b837b780c349f29df97550c01e7 --- /dev/null +++ b/src/test/java/test/MeasurementRepository.java @@ -0,0 +1,10 @@ +package test; + +import java.util.HashMap; +import java.util.Map; + +public class MeasurementRepository { + + public final Map<String, PerformanceResult> performanceResults = new HashMap<String, PerformanceResult>(); + +} diff --git a/src/test/java/test/PerformanceResult.java b/src/test/java/test/PerformanceResult.java new file mode 100644 index 0000000000000000000000000000000000000000..c4690fa5cdbbb89a26cc89537b0336b4e33e11ea --- /dev/null +++ b/src/test/java/test/PerformanceResult.java @@ -0,0 +1,5 @@ +package test; + +public class PerformanceResult { + +}