Skip to content
Snippets Groups Projects
Commit 66fd725d authored by Christian Wulf's avatar Christian Wulf
Browse files

refactored all tests to PerformanceTests;

added MeasurementRepository
parent 4ed42fd7
Branches
Tags
No related merge requests found
Showing
with 51 additions and 184 deletions
......@@ -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;
}
......
......@@ -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;
}
}
......@@ -24,6 +24,11 @@ public interface Stage<I, O> {
void setSuccessor(Stage<? super O, ?> successor);
/**
* Used for execute4() (experiment02)
*
* @return
*/
boolean isReschedulable();
void onIsPipelineHead();
......
......@@ -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;
}
}
......@@ -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);
......
......@@ -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 {
......
......@@ -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();
......
......@@ -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() {
......
......@@ -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
......
......@@ -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) {
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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];
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment