From 2ce14d6ba47f935d4ba1f0282b9e48ea49f53611 Mon Sep 17 00:00:00 2001
From: Christian Wulf <chw@informatik.uni-kiel.de>
Date: Mon, 4 May 2015 13:03:00 +0200
Subject: [PATCH] updated to teetime 1.2-SNAPSHOT

---
 .settings/edu.umd.cs.findbugs.core.prefs            |  2 +-
 pom.xml                                             | 13 +------------
 .../traceReading/ChwHomeTcpTraceReadingTest.java    |  4 ++--
 .../ChwHomeTcpTraceReconstructionAnalysisTest.java  |  3 +--
 .../ChwHomeTraceReconstructionAnalysisTest.java     |  9 +++------
 .../ChwWorkTcpTraceReconstructionAnalysisTest.java  |  3 +--
 .../ChwWorkTraceReconstructionAnalysisTest.java     | 12 +++---------
 ...pTraceReconstructionAnalysisWithThreadsTest.java |  4 ++--
 ...pTraceReconstructionAnalysisWithThreadsTest.java |  4 ++--
 ...onstructionAnalysisWithThreadsConfiguration.java | 11 +++++------
 ...orkTcpTraceReductionAnalysisWithThreadsTest.java |  4 ++--
 ...ceReductionAnalysisWithThreadsConfiguration.java | 11 +++++------
 .../java/util/test/PerformanceTest.java             |  2 ++
 13 files changed, 30 insertions(+), 52 deletions(-)

diff --git a/.settings/edu.umd.cs.findbugs.core.prefs b/.settings/edu.umd.cs.findbugs.core.prefs
index 4442f99a..603ed555 100644
--- a/.settings/edu.umd.cs.findbugs.core.prefs
+++ b/.settings/edu.umd.cs.findbugs.core.prefs
@@ -1,5 +1,5 @@
 #FindBugs User Preferences
-#Thu Apr 30 18:23:15 CEST 2015
+#Mon May 04 12:59:03 CEST 2015
 detector_threshold=3
 effort=max
 excludefilter0=.fbExcludeFilterFile|true
diff --git a/pom.xml b/pom.xml
index 90f4fb32..0f3824da 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,7 +68,7 @@
 		<dependency>
 			<groupId>net.sourceforge.teetime</groupId>
 			<artifactId>teetime</artifactId>
-			<version>1.1</version>
+			<version>1.2-SNAPSHOT</version>
 		</dependency>
 		<dependency>
 			<groupId>net.kieker-monitoring</groupId>
@@ -81,12 +81,6 @@
 			<version>4.11</version>
 			<scope>test</scope>
 		</dependency>
-		<dependency>
-			<groupId>org.hamcrest</groupId>
-			<artifactId>hamcrest-core</artifactId>
-			<version>1.3</version>
-			<scope>test</scope>
-		</dependency>
 		<dependency>
 			<groupId>org.hamcrest</groupId>
 			<artifactId>hamcrest-library</artifactId>
@@ -109,11 +103,6 @@
 			<artifactId>guava</artifactId>
 			<version>18.0</version>
 		</dependency>
-		<dependency>
-			<groupId>org.jctools</groupId>
-			<artifactId>jctools-core</artifactId>
-			<version>1.0</version>
-		</dependency>
 	</dependencies>
 
 	<build>
diff --git a/src/performancetest/java/teetime/examples/traceReading/ChwHomeTcpTraceReadingTest.java b/src/performancetest/java/teetime/examples/traceReading/ChwHomeTcpTraceReadingTest.java
index c80634ed..34fe9805 100644
--- a/src/performancetest/java/teetime/examples/traceReading/ChwHomeTcpTraceReadingTest.java
+++ b/src/performancetest/java/teetime/examples/traceReading/ChwHomeTcpTraceReadingTest.java
@@ -66,8 +66,8 @@ public class ChwHomeTcpTraceReadingTest {
 	public void performAnalysis() {
 		final TcpTraceLoggingExtAnalysisConfiguration configuration = new TcpTraceLoggingExtAnalysisConfiguration();
 
-		final Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		final Analysis<TcpTraceLoggingExtAnalysisConfiguration> analysis;
+		analysis = new Analysis<TcpTraceLoggingExtAnalysisConfiguration>(configuration);
 
 		this.stopWatch.start();
 		try {
diff --git a/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTcpTraceReconstructionAnalysisTest.java b/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTcpTraceReconstructionAnalysisTest.java
index db85ffe1..aeb37a96 100644
--- a/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTcpTraceReconstructionAnalysisTest.java
+++ b/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTcpTraceReconstructionAnalysisTest.java
@@ -63,8 +63,7 @@ public class ChwHomeTcpTraceReconstructionAnalysisTest {
 	public void performAnalysis() {
 		final TcpTraceReconstructionConf configuration = new TcpTraceReconstructionConf();
 
-		final Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		final Analysis<TcpTraceReconstructionConf> analysis = new Analysis<TcpTraceReconstructionConf>(configuration);
 
 		this.stopWatch.start();
 		try {
diff --git a/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTraceReconstructionAnalysisTest.java b/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTraceReconstructionAnalysisTest.java
index 01b5daac..b8accd27 100644
--- a/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTraceReconstructionAnalysisTest.java
+++ b/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTraceReconstructionAnalysisTest.java
@@ -61,8 +61,7 @@ public class ChwHomeTraceReconstructionAnalysisTest {
 	public void performAnalysisWithEprintsLogs() {
 		final TraceReconstructionConf configuration = new TraceReconstructionConf(new File(RESOURCE_DIR + "data/Eprints-logs"));
 
-		Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		final Analysis<TraceReconstructionConf> analysis = new Analysis<TraceReconstructionConf>(configuration);
 
 		this.stopWatch.start();
 		try {
@@ -91,8 +90,7 @@ public class ChwHomeTraceReconstructionAnalysisTest {
 	public void performAnalysisWithKiekerLogs() {
 		final TraceReconstructionConf configuration = new TraceReconstructionConf(new File(RESOURCE_DIR + "data/kieker-logs"));
 
-		Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		Analysis<TraceReconstructionConf> analysis = new Analysis<TraceReconstructionConf>(configuration);
 
 		this.stopWatch.start();
 		try {
@@ -121,8 +119,7 @@ public class ChwHomeTraceReconstructionAnalysisTest {
 	public void performAnalysisWithKieker2Logs() {
 		final TraceReconstructionConf configuration = new TraceReconstructionConf(new File(RESOURCE_DIR + "data/kieker2-logs"));
 
-		Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		final Analysis<TraceReconstructionConf> analysis = new Analysis<TraceReconstructionConf>(configuration);
 
 		this.stopWatch.start();
 		try {
diff --git a/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTcpTraceReconstructionAnalysisTest.java b/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTcpTraceReconstructionAnalysisTest.java
index 1e936725..61f51e7b 100644
--- a/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTcpTraceReconstructionAnalysisTest.java
+++ b/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTcpTraceReconstructionAnalysisTest.java
@@ -56,8 +56,7 @@ public class ChwWorkTcpTraceReconstructionAnalysisTest {
 	public void performAnalysis() {
 		final TcpTraceReconstructionConf configuration = new TcpTraceReconstructionConf();
 
-		Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		Analysis<TcpTraceReconstructionConf> analysis = new Analysis<TcpTraceReconstructionConf>(configuration);
 
 		this.stopWatch.start();
 		try {
diff --git a/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTraceReconstructionAnalysisTest.java b/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTraceReconstructionAnalysisTest.java
index 3c111756..c719e62c 100644
--- a/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTraceReconstructionAnalysisTest.java
+++ b/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTraceReconstructionAnalysisTest.java
@@ -58,9 +58,7 @@ class ChwWorkTraceReconstructionAnalysisTest {
 	@Test
 	public void performAnalysisWithEprintsLogs() {
 		final TraceReconstructionConf configuration = new TraceReconstructionConf(new File("src/test/data/Eprints-logs"));
-
-		Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		final Analysis<TraceReconstructionConf> analysis = new Analysis<TraceReconstructionConf>(configuration);
 
 		this.stopWatch.start();
 		try {
@@ -86,9 +84,7 @@ class ChwWorkTraceReconstructionAnalysisTest {
 	@Test
 	public void performAnalysisWithKiekerLogs() {
 		final TraceReconstructionConf configuration = new TraceReconstructionConf(new File("src/test/data/kieker-logs"));
-
-		Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		final Analysis<TraceReconstructionConf> analysis = new Analysis<TraceReconstructionConf>(configuration);
 
 		this.stopWatch.start();
 		try {
@@ -116,9 +112,7 @@ class ChwWorkTraceReconstructionAnalysisTest {
 	@Test
 	public void performAnalysisWithKieker2Logs() {
 		final TraceReconstructionConf configuration = new TraceReconstructionConf(new File("src/test/data/kieker2-logs"));
-
-		Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		final Analysis<TraceReconstructionConf> analysis = new Analysis<TraceReconstructionConf>(configuration);
 
 		this.stopWatch.start();
 		try {
diff --git a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwHomeTcpTraceReconstructionAnalysisWithThreadsTest.java b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwHomeTcpTraceReconstructionAnalysisWithThreadsTest.java
index 62755a6f..b5f7f604 100644
--- a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwHomeTcpTraceReconstructionAnalysisWithThreadsTest.java
+++ b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwHomeTcpTraceReconstructionAnalysisWithThreadsTest.java
@@ -73,8 +73,8 @@ public class ChwHomeTcpTraceReconstructionAnalysisWithThreadsTest {
 	void performAnalysis(final int numWorkerThreads) {
 		final TcpTraceReconstructionAnalysisWithThreadsConfiguration configuration = new TcpTraceReconstructionAnalysisWithThreadsConfiguration(numWorkerThreads);
 
-		Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		Analysis<TcpTraceReconstructionAnalysisWithThreadsConfiguration> analysis;
+		analysis = new Analysis<TcpTraceReconstructionAnalysisWithThreadsConfiguration>(configuration);
 
 		this.stopWatch.start();
 		try {
diff --git a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java
index 8ec08f8a..8595e05c 100644
--- a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java
+++ b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java
@@ -88,8 +88,8 @@ public class ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest {
 	void performAnalysis(final int numWorkerThreads) {
 		final TcpTraceReconstructionAnalysisWithThreadsConfiguration configuration = new TcpTraceReconstructionAnalysisWithThreadsConfiguration(numWorkerThreads);
 
-		final Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		final Analysis<TcpTraceReconstructionAnalysisWithThreadsConfiguration> analysis;
+		analysis = new Analysis<TcpTraceReconstructionAnalysisWithThreadsConfiguration>(configuration);
 
 		this.stopWatch.start();
 		try {
diff --git a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/TcpTraceReconstructionAnalysisWithThreadsConfiguration.java b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/TcpTraceReconstructionAnalysisWithThreadsConfiguration.java
index 674b832a..787169d6 100644
--- a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/TcpTraceReconstructionAnalysisWithThreadsConfiguration.java
+++ b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/TcpTraceReconstructionAnalysisWithThreadsConfiguration.java
@@ -25,11 +25,11 @@ import teetime.framework.AbstractStage;
 import teetime.framework.AnalysisConfiguration;
 import teetime.framework.Pipeline;
 import teetime.framework.Stage;
+import teetime.framework.pipe.IMonitorablePipe;
 import teetime.framework.pipe.IPipe;
 import teetime.framework.pipe.IPipeFactory;
 import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering;
 import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication;
-import teetime.framework.pipe.SpScPipe;
 import teetime.stage.Clock;
 import teetime.stage.Counter;
 import teetime.stage.ElementDelayMeasuringStage;
@@ -70,7 +70,7 @@ public class TcpTraceReconstructionAnalysisWithThreadsConfiguration extends Anal
 	private final StageFactory<Counter<EventBasedTrace>> traceCounterFactory;
 	private final StageFactory<ElementThroughputMeasuringStage<EventBasedTrace>> traceThroughputFilterFactory;
 
-	private final List<IPipe> tcpRelayPipes = new LinkedList<IPipe>();
+	private final List<IMonitorablePipe> tcpRelayPipes = new LinkedList<IMonitorablePipe>();
 	private final IPipeFactory intraThreadPipeFactory;
 	private final IPipeFactory interThreadPipeFactory;
 
@@ -183,7 +183,7 @@ public class TcpTraceReconstructionAnalysisWithThreadsConfiguration extends Anal
 
 		// connect stages
 		IPipe tcpRelayPipe = interThreadPipeFactory.create(tcpReaderPipeline.getNewOutputPort(), relay.getInputPort(), TCP_RELAY_MAX_SIZE);
-		this.tcpRelayPipes.add(tcpRelayPipe);
+		this.tcpRelayPipes.add((IMonitorablePipe) tcpRelayPipe);
 		// SysOutFilter<EventBasedTrace> sysout = new SysOutFilter<EventBasedTrace>(tcpRelayPipe);
 
 		interThreadPipeFactory.create(clockStage.getNewOutputPort(), recordThroughputFilter.getTriggerInputPort(), 10);
@@ -256,9 +256,8 @@ public class TcpTraceReconstructionAnalysisWithThreadsConfiguration extends Anal
 
 	public int getMaxNumWaits() {
 		int maxNumWaits = 0;
-		for (IPipe pipe : this.tcpRelayPipes) {
-			SpScPipe interThreadPipe = (SpScPipe) pipe;
-			maxNumWaits = Math.max(maxNumWaits, interThreadPipe.getNumWaits());
+		for (IMonitorablePipe pipe : this.tcpRelayPipes) {
+			maxNumWaits = Math.max(maxNumWaits, pipe.getNumWaits());
 		}
 		return maxNumWaits;
 	}
diff --git a/src/performancetest/java/teetime/examples/traceReductionWithThreads/ChwWorkTcpTraceReductionAnalysisWithThreadsTest.java b/src/performancetest/java/teetime/examples/traceReductionWithThreads/ChwWorkTcpTraceReductionAnalysisWithThreadsTest.java
index 9f33491d..4b7468c5 100644
--- a/src/performancetest/java/teetime/examples/traceReductionWithThreads/ChwWorkTcpTraceReductionAnalysisWithThreadsTest.java
+++ b/src/performancetest/java/teetime/examples/traceReductionWithThreads/ChwWorkTcpTraceReductionAnalysisWithThreadsTest.java
@@ -102,8 +102,8 @@ public class ChwWorkTcpTraceReductionAnalysisWithThreadsTest {
 	void performAnalysis(final int numWorkerThreads) {
 		final TcpTraceReductionAnalysisWithThreadsConfiguration configuration = new TcpTraceReductionAnalysisWithThreadsConfiguration(numWorkerThreads);
 
-		Analysis analysis = new Analysis(configuration);
-		analysis.init();
+		Analysis<TcpTraceReductionAnalysisWithThreadsConfiguration> analysis;
+		analysis = new Analysis<TcpTraceReductionAnalysisWithThreadsConfiguration>(configuration);
 
 		this.stopWatch.start();
 		try {
diff --git a/src/performancetest/java/teetime/examples/traceReductionWithThreads/TcpTraceReductionAnalysisWithThreadsConfiguration.java b/src/performancetest/java/teetime/examples/traceReductionWithThreads/TcpTraceReductionAnalysisWithThreadsConfiguration.java
index f20ce395..8c03d88b 100644
--- a/src/performancetest/java/teetime/examples/traceReductionWithThreads/TcpTraceReductionAnalysisWithThreadsConfiguration.java
+++ b/src/performancetest/java/teetime/examples/traceReductionWithThreads/TcpTraceReductionAnalysisWithThreadsConfiguration.java
@@ -27,11 +27,11 @@ import teetime.framework.AbstractStage;
 import teetime.framework.AnalysisConfiguration;
 import teetime.framework.Pipeline;
 import teetime.framework.Stage;
+import teetime.framework.pipe.IMonitorablePipe;
 import teetime.framework.pipe.IPipe;
 import teetime.framework.pipe.IPipeFactory;
 import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering;
 import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication;
-import teetime.framework.pipe.SpScPipe;
 import teetime.stage.Clock;
 import teetime.stage.Counter;
 import teetime.stage.ElementDelayMeasuringStage;
@@ -62,7 +62,7 @@ public class TcpTraceReductionAnalysisWithThreadsConfiguration extends AnalysisC
 
 	private final List<EventBasedTrace> elementCollection = new LinkedList<EventBasedTrace>();
 
-	private final List<IPipe> tcpRelayPipes = new ArrayList<IPipe>();
+	private final List<IMonitorablePipe> tcpRelayPipes = new ArrayList<IMonitorablePipe>();
 	private final int numWorkerThreads;
 
 	private final ConcurrentHashMapWithDefault<Long, EventBasedTrace> traceId2trace;
@@ -183,7 +183,7 @@ public class TcpTraceReductionAnalysisWithThreadsConfiguration extends AnalysisC
 
 		// connect stages
 		final IPipe pipe = interThreadPipeFactory.create(tcpPipeline.getLastStage().getNewOutputPort(), relay.getInputPort(), TCP_RELAY_MAX_SIZE);
-		this.tcpRelayPipes.add(pipe);
+		this.tcpRelayPipes.add((IMonitorablePipe) pipe);
 
 		intraThreadPipeFactory.create(relay.getOutputPort(), recordCounter.getInputPort());
 		intraThreadPipeFactory.create(recordCounter.getOutputPort(), traceMetadataCounter.getInputPort());
@@ -241,9 +241,8 @@ public class TcpTraceReductionAnalysisWithThreadsConfiguration extends AnalysisC
 
 	public int getMaxNumWaits() {
 		int maxNumWaits = 0;
-		for (IPipe pipe : this.tcpRelayPipes) {
-			SpScPipe interThreadPipe = (SpScPipe) pipe;
-			maxNumWaits = Math.max(maxNumWaits, interThreadPipe.getNumWaits());
+		for (IMonitorablePipe pipe : this.tcpRelayPipes) {
+			maxNumWaits = Math.max(maxNumWaits, pipe.getNumWaits());
 		}
 		return maxNumWaits;
 	}
diff --git a/src/performancetest/java/util/test/PerformanceTest.java b/src/performancetest/java/util/test/PerformanceTest.java
index 5a4f034e..845f9239 100644
--- a/src/performancetest/java/util/test/PerformanceTest.java
+++ b/src/performancetest/java/util/test/PerformanceTest.java
@@ -30,6 +30,8 @@ import teetime.util.StopWatch;
 import teetime.util.TimestampObject;
 import teetime.util.test.eval.PerformanceResult;
 import teetime.util.test.eval.StatisticsUtil;
+import teetime.util.test.framework.MeasurementRepository;
+import teetime.util.test.framework.PerformanceCheckProfileRepository;
 
 public abstract class PerformanceTest {
 
-- 
GitLab