From d4a88568ccf286c330092a7a08ebced11ad4e1fe Mon Sep 17 00:00:00 2001
From: Christian Wulf <chw@informatik.uni-kiel.de>
Date: Fri, 19 Dec 2014 07:51:09 +0100
Subject: [PATCH] removed perf test 17 because it is out-dated

---
 .../ChwHomeComparisonMethodcallWithPorts.java |   6 +-
 .../ChwWorkComparisonMethodcallWithPorts.java |   8 +-
 .../ComparisonMethodcallWithPorts.java        |   2 -
 .../NieWorkComparisonMethodcallWithPorts.java |   6 +-
 ...dCallThoughputTimestampAnalysis17Test.java |  60 ------
 .../MethodCallThroughputAnalysis17.java       | 202 ------------------
 src/test/resources/logback.xml                |   7 +-
 7 files changed, 9 insertions(+), 282 deletions(-)
 delete mode 100644 src/performancetest/java/teetime/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java
 delete mode 100644 src/performancetest/java/teetime/examples/experiment17/MethodCallThroughputAnalysis17.java

diff --git a/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java
index 5f13c9b9..42c17326 100644
--- a/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java
+++ b/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java
@@ -33,8 +33,6 @@ public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerfor
 				.get("testWithManyObjectsAnd2Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)");
 		PerformanceResult test16c = performanceResults
 				.get("testWithManyObjectsAnd4Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)");
-		PerformanceResult test17 = performanceResults
-				.get("testWithManyObjects(teetime.examples.experiment17.MethodCallThoughputTimestampAnalysis17Test)");
 		PerformanceResult test19a = performanceResults
 				.get("testWithManyObjectsAnd1Thread(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)");
 		PerformanceResult test19b = performanceResults
@@ -43,10 +41,8 @@ public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerfor
 				.get("testWithManyObjectsAnd4Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)");
 
 		double value15 = (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5);
-		double value17 = (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5);
 
 		System.out.println("value15: " + value15);
-		System.out.println("value17: " + value17);
 
 		// until 25.06.2014 (incl.)
 		// assertEquals(44, (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1);
@@ -74,7 +70,7 @@ public class ChwHomeComparisonMethodcallWithPorts extends AbstractProfiledPerfor
 
 		// since 13.12.2014 (incl.)
 		assertEquals(40, value15, 4.1); // -28
-		assertEquals(43, value17, 4.1); // -35
+		// assertEquals(43, value17, 4.1); // -35
 
 		// below results vary too much, possibly due to the OS' scheduler
 		// assertEquals(RESULT_TESTS_16, (double) test16a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1);
diff --git a/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java
index 553fad83..cf0344cc 100644
--- a/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java
+++ b/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java
@@ -5,9 +5,9 @@ import static org.junit.Assert.assertEquals;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import util.test.AbstractProfiledPerformanceAssertion;
 import util.test.PerformanceResult;
 import util.test.PerformanceTest;
-import util.test.AbstractProfiledPerformanceAssertion;
 
 public class ChwWorkComparisonMethodcallWithPorts extends AbstractProfiledPerformanceAssertion {
 
@@ -27,8 +27,6 @@ public class ChwWorkComparisonMethodcallWithPorts extends AbstractProfiledPerfor
 				.get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)");
 		PerformanceResult test15 = performanceResults
 				.get("testWithManyObjects(teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test)");
-		PerformanceResult test17 = performanceResults
-				.get("testWithManyObjects(teetime.examples.experiment17.MethodCallThoughputTimestampAnalysis17Test)");
 		PerformanceResult test19a = performanceResults
 				.get("testWithManyObjectsAnd1Thread(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)");
 		PerformanceResult test19b = performanceResults
@@ -37,10 +35,8 @@ public class ChwWorkComparisonMethodcallWithPorts extends AbstractProfiledPerfor
 				.get("testWithManyObjectsAnd4Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)");
 
 		double value15 = (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5);
-		double value17 = (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5);
 
 		System.out.println("value15: " + value15);
-		System.out.println("value17: " + value17);
 
 		// until 25.06.2014 (incl.)
 		// assertEquals(44, (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1);
@@ -60,7 +56,7 @@ public class ChwWorkComparisonMethodcallWithPorts extends AbstractProfiledPerfor
 
 		// since 14.10.2014 (incl.)
 		assertEquals(36, value15, 4.1); // -8
-		assertEquals(46, value17, 4.1); // -7
+		// assertEquals(46, value17, 4.1); // -7
 
 		// below results vary too much, possibly due to the OS' scheduler
 		// assertEquals(RESULT_TESTS_16, (double) test16a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1);
diff --git a/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java
index 3d45a40e..bdfea3be 100644
--- a/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java
+++ b/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java
@@ -13,7 +13,6 @@ import teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test;
 import teetime.examples.experiment14.MethodCallThoughputTimestampAnalysis14Test;
 import teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test;
 import teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test;
-import teetime.examples.experiment17.MethodCallThoughputTimestampAnalysis17Test;
 import teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test;
 import util.test.AbstractProfiledPerformanceAssertion;
 import util.test.PerformanceCheckProfileRepository;
@@ -27,7 +26,6 @@ import util.test.PerformanceCheckProfileRepository;
 	MethodCallThoughputTimestampAnalysis14Test.class,
 	MethodCallThoughputTimestampAnalysis15Test.class,
 	MethodCallThoughputTimestampAnalysis16Test.class,
-	MethodCallThoughputTimestampAnalysis17Test.class,
 	MethodCallThoughputTimestampAnalysis19Test.class,
 })
 public class ComparisonMethodcallWithPorts {
diff --git a/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java
index fc57df9b..48589829 100644
--- a/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java
+++ b/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java
@@ -5,9 +5,9 @@ import static org.junit.Assert.assertEquals;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import util.test.AbstractProfiledPerformanceAssertion;
 import util.test.PerformanceResult;
 import util.test.PerformanceTest;
-import util.test.AbstractProfiledPerformanceAssertion;
 
 public class NieWorkComparisonMethodcallWithPorts extends AbstractProfiledPerformanceAssertion {
 
@@ -41,8 +41,6 @@ public class NieWorkComparisonMethodcallWithPorts extends AbstractProfiledPerfor
 				.get("testWithManyObjectsAnd2Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)");
 		PerformanceResult test16c = performanceResults
 				.get("testWithManyObjectsAnd4Threads(teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test)");
-		PerformanceResult test17 = performanceResults
-				.get("testWithManyObjects(teetime.examples.experiment17.MethodCallThoughputTimestampAnalysis17Test)");
 		PerformanceResult test19a = performanceResults
 				.get("testWithManyObjectsAnd1Thread(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)");
 		PerformanceResult test19b = performanceResults
@@ -65,7 +63,7 @@ public class NieWorkComparisonMethodcallWithPorts extends AbstractProfiledPerfor
 		// assertEquals(RESULT_TESTS_19, (double) test19b.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1);
 		// assertEquals(RESULT_TESTS_19, (double) test19c.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1);
 
-		assertEquals(56, (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1);
+		// assertEquals(56, (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1);
 
 		// check speedup
 		assertEquals(2, (double) test16a.overallDurationInNs / test16b.overallDurationInNs, 0.2);
diff --git a/src/performancetest/java/teetime/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java b/src/performancetest/java/teetime/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java
deleted file mode 100644
index 650d1170..00000000
--- a/src/performancetest/java/teetime/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/***************************************************************************
- * Copyright 2014 Kieker Project (http://kieker-monitoring.net)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***************************************************************************/
-package teetime.examples.experiment17;
-
-import org.junit.Test;
-
-import teetime.util.ConstructorClosure;
-import teetime.util.ListUtil;
-import teetime.util.TimestampObject;
-import util.test.PerformanceTest;
-
-/**
- * @author Christian Wulf
- *
- * @since 1.10
- */
-public class MethodCallThoughputTimestampAnalysis17Test extends PerformanceTest {
-
-	@Test
-	public void testWithManyObjects() {
-		System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS="
-				+ NUM_NOOP_FILTERS + "...");
-
-		// int count = 10;
-		// while (count-- > 0) {
-		final MethodCallThroughputAnalysis17 analysis = new MethodCallThroughputAnalysis17();
-		analysis.setNumNoopFilters(NUM_NOOP_FILTERS);
-		analysis.setInput(NUM_OBJECTS_TO_CREATE, new ConstructorClosure<TimestampObject>() {
-			@Override
-			public TimestampObject create() {
-				return new TimestampObject();
-			}
-		});
-		analysis.init();
-
-		System.out.println("starting");
-		this.stopWatch.start();
-		try {
-			analysis.start();
-		} finally {
-			this.stopWatch.end();
-		}
-
-		this.timestampObjects = ListUtil.merge(analysis.getTimestampObjectsList());
-		// }
-	}
-}
diff --git a/src/performancetest/java/teetime/examples/experiment17/MethodCallThroughputAnalysis17.java b/src/performancetest/java/teetime/examples/experiment17/MethodCallThroughputAnalysis17.java
deleted file mode 100644
index 1dc83abb..00000000
--- a/src/performancetest/java/teetime/examples/experiment17/MethodCallThroughputAnalysis17.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/***************************************************************************
- * Copyright 2014 Kieker Project (http://kieker-monitoring.net)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ***************************************************************************/
-package teetime.examples.experiment17;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import teetime.framework.OldHeadPipeline;
-import teetime.framework.RunnableProducerStage;
-import teetime.framework.Stage;
-import teetime.framework.pipe.DummyPipe;
-import teetime.framework.pipe.IPipe;
-import teetime.framework.pipe.PipeFactoryRegistry;
-import teetime.framework.pipe.RelayTestPipe;
-import teetime.framework.pipe.UnorderedGrowablePipe;
-import teetime.framework.signal.TerminatingSignal;
-import teetime.stage.CollectorSink;
-import teetime.stage.NoopFilter;
-import teetime.stage.ObjectProducer;
-import teetime.stage.Relay;
-import teetime.stage.StartTimestampFilter;
-import teetime.stage.StopTimestampFilter;
-import teetime.stage.basic.distributor.Distributor;
-import teetime.stage.io.EveryXthPrinter;
-import teetime.util.ConstructorClosure;
-import teetime.util.TimestampObject;
-
-/**
- * @author Christian Wulf
- *
- * @since 1.10
- */
-public class MethodCallThroughputAnalysis17 {
-
-	private static final int SPSC_INITIAL_CAPACITY = 100100;
-	private static final int NUM_WORKER_THREADS = Runtime.getRuntime().availableProcessors();
-
-	private int numInputObjects;
-	private ConstructorClosure<TimestampObject> inputObjectCreator;
-	private int numNoopFilters;
-
-	private final PipeFactoryRegistry pipeFactory = PipeFactoryRegistry.INSTANCE;
-	private final List<List<TimestampObject>> timestampObjectsList = new LinkedList<List<TimestampObject>>();
-
-	private Thread producerThread;
-	private Thread[] workerThreads;
-
-	public void init() {
-		OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> producerPipeline = this.buildProducerPipeline(this.numInputObjects,
-				this.inputObjectCreator);
-		this.producerThread = new Thread(new RunnableProducerStage(producerPipeline));
-
-		int numWorkerThreads = Math.min(NUM_WORKER_THREADS, 1); // only for testing purpose
-
-		this.workerThreads = new Thread[numWorkerThreads];
-		for (int i = 0; i < this.workerThreads.length; i++) {
-			List<TimestampObject> resultList = new ArrayList<TimestampObject>(this.numInputObjects);
-			this.timestampObjectsList.add(resultList);
-
-			OldHeadPipeline<?, ?> pipeline = this.buildPipeline(null, resultList);
-			this.workerThreads[i] = new Thread(new RunnableProducerStage(pipeline));
-		}
-
-		// this.producerThread = new Thread(new Runnable() {
-		// @Override
-		// public void run() {
-		// TimestampObject ts;
-		// try {
-		// ts = MethodCallThroughputAnalysis17.this.inputObjectCreator.call();
-		// System.out.println("test" + producerPipeline + ", # filters: " + MethodCallThroughputAnalysis17.this.numNoopFilters + ", ts: "
-		// + ts);
-		// MethodCallThroughputAnalysis17.this.numInputObjects++;
-		// System.out.println("numInputObjects: " + MethodCallThroughputAnalysis17.this.numInputObjects);
-		// MethodCallThroughputAnalysis17.this.numInputObjects--;
-		// } catch (Exception e) {
-		// // TODO Auto-generated catch block
-		// e.printStackTrace();
-		// }
-		// System.out.println("run end");
-		// }
-		// });
-
-		// this.producerThread.start();
-		// this.producerThread.run();
-		new RunnableProducerStage(producerPipeline).run();
-
-		// try {
-		// this.producerThread.join();
-		// } catch (InterruptedException e1) {
-		// // TODO Auto-generated catch block
-		// e1.printStackTrace();
-		// }
-
-	}
-
-	@SuppressWarnings("unchecked")
-	private OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> buildProducerPipeline(final int numInputObjects,
-			final ConstructorClosure<TimestampObject> inputObjectCreator) {
-		final ObjectProducer<TimestampObject> objectProducer = new ObjectProducer<TimestampObject>(numInputObjects, inputObjectCreator);
-		Distributor<TimestampObject> distributor = new Distributor<TimestampObject>();
-
-		// UnorderedGrowablePipe.connect(objectProducer.getOutputPort(), sink.getInputPort());
-		// objectProducer.getOutputPort().pipe = new UnorderedGrowablePipe<TimestampObject>();
-
-		UnorderedGrowablePipe.connect(objectProducer.getOutputPort(), distributor.getInputPort());
-		distributor.getNewOutputPort().setPipe(new DummyPipe());
-
-		final OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>> pipeline = new OldHeadPipeline<ObjectProducer<TimestampObject>, Distributor<TimestampObject>>();
-		pipeline.setFirstStage(objectProducer);
-		// pipeline.setFirstStage(sink);
-		// pipeline.setFirstStage(endStage);
-		pipeline.setLastStage(distributor);
-		// pipeline.setLastStage(sink);
-		// pipeline.setLastStage(new EndStage<TimestampObject>());
-		return pipeline;
-	}
-
-	/**
-	 * @param numNoopFilters
-	 * @since 1.10
-	 */
-	private OldHeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>> buildPipeline(final Stage previousStage,
-			final List<TimestampObject> timestampObjects) {
-		// create stages
-		Relay<TimestampObject> relay = new Relay<TimestampObject>();
-		final StartTimestampFilter startTimestampFilter = new StartTimestampFilter();
-		@SuppressWarnings("unchecked")
-		final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters];
-		for (int i = 0; i < noopFilters.length; i++) {
-			noopFilters[i] = new NoopFilter<TimestampObject>();
-		}
-		final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter();
-		EveryXthPrinter<TimestampObject> everyXthPrinter = new EveryXthPrinter<TimestampObject>(100000);
-		final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(timestampObjects);
-
-		IPipe startPipe = new RelayTestPipe<TimestampObject>(this.numInputObjects, this.inputObjectCreator);
-		startPipe.sendSignal(new TerminatingSignal());
-
-		relay.getInputPort().setPipe(startPipe);
-		UnorderedGrowablePipe.connect(relay.getOutputPort(), startTimestampFilter.getInputPort());
-		UnorderedGrowablePipe.connect(startTimestampFilter.getOutputPort(), noopFilters[0].getInputPort());
-		for (int i = 0; i < noopFilters.length - 1; i++) {
-			UnorderedGrowablePipe.connect(noopFilters[i].getOutputPort(), noopFilters[i + 1].getInputPort());
-		}
-		UnorderedGrowablePipe.connect(noopFilters[noopFilters.length - 1].getOutputPort(), stopTimestampFilter.getInputPort());
-		UnorderedGrowablePipe.connect(stopTimestampFilter.getOutputPort(), everyXthPrinter.getInputPort());
-		UnorderedGrowablePipe.connect(everyXthPrinter.getNewOutputPort(), collectorSink.getInputPort());
-
-		final OldHeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>> pipeline = new OldHeadPipeline<Relay<TimestampObject>, CollectorSink<TimestampObject>>();
-		pipeline.setFirstStage(relay);
-		pipeline.setLastStage(collectorSink);
-		return pipeline;
-	}
-
-	public void start() {
-
-		for (Thread workerThread : this.workerThreads) {
-			workerThread.start();
-		}
-
-		try {
-			for (Thread workerThread : this.workerThreads) {
-				workerThread.join();
-			}
-		} catch (InterruptedException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-	}
-
-	public void setInput(final int numInputObjects, final ConstructorClosure<TimestampObject> inputObjectCreator) {
-		this.numInputObjects = numInputObjects;
-		this.inputObjectCreator = inputObjectCreator;
-	}
-
-	public int getNumNoopFilters() {
-		return this.numNoopFilters;
-	}
-
-	public void setNumNoopFilters(final int numNoopFilters) {
-		this.numNoopFilters = numNoopFilters;
-	}
-
-	public List<List<TimestampObject>> getTimestampObjectsList() {
-		return this.timestampObjectsList;
-	}
-
-}
diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml
index 40701535..8a46d9dc 100644
--- a/src/test/resources/logback.xml
+++ b/src/test/resources/logback.xml
@@ -20,11 +20,12 @@
 		</encoder>
 	</appender>
 	
-	<logger name="teetime.framework" level="TRACE" />
-	<logger name="teetime.stage" level="TRACE" />
+<!-- 	<logger name="teetime.framework" level="TRACE" /> -->
+<!-- 	<logger name="teetime.stage" level="TRACE" /> -->
+	<logger name="teetime" level="INFO" />
 	<logger name="util" level="INFO" />
 
-	<root level="ERROR">
+	<root level="WARN">
 		<appender-ref ref="CONSOLE" />
 	</root>
 </configuration>
\ No newline at end of file
-- 
GitLab