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

removed warnings

parent 52479054
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ public class SpScPipe<T> extends AbstractPipe<T> {
private int maxSize;
private final AtomicReference<Signal> signal = new AtomicReference<Signal>();
private SpScPipe(final int capacity) {
public SpScPipe(final int capacity) {
this.queue = new FFBufferOrdered3<T>(capacity);
}
......
......@@ -73,6 +73,20 @@ public class ChwComparisonMethodcallWithPorts {
PerformanceResult test19c = performanceResults
.get("testWithManyObjectsAnd4Threads(teetime.variant.methodcallWithPorts.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)");
double value14 = (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value10 = (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value11 = (double) test11.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value9 = (double) test9.quantiles.get(0.5) / test1.quantiles.get(0.5);
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("value14: " + value14);
System.out.println("value10: " + value10);
System.out.println("value11: " + value11);
System.out.println("value9: " + value9);
System.out.println("value15: " + value15);
System.out.println("value17: " + value17);
// until 25.06.2014 (incl.)
// assertEquals(60, (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1);
// assertEquals(14, (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5), 2.1);
......@@ -82,12 +96,20 @@ public class ChwComparisonMethodcallWithPorts {
// assertEquals(39, (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1);
// since 26.06.2014 (incl.)
assertEquals(76, (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); // +16
assertEquals(26, (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5), 2.1); // +14
assertEquals(44, (double) test11.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); // +12
assertEquals(36, (double) test9.quantiles.get(0.5) / test1.quantiles.get(0.5), 2.1); // +14
assertEquals(44, (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); // +0
assertEquals(53, (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5), 4.1); // +14
// assertEquals(76, value14, 5.1); // +16
// assertEquals(26, value10, 2.1); // +14
// assertEquals(44, value11, 4.1); // +12
// assertEquals(36, value9, 2.1); // +14
// assertEquals(44, value15, 4.1); // +0
// assertEquals(53, value17, 4.1); // +14
// since 04.07.2014 (incl.)
assertEquals(86, value14, 5.1); // +16
assertEquals(26, value10, 2.1); // +0
assertEquals(37, value11, 4.1); // -7
assertEquals(42, value9, 2.1); // +6
assertEquals(44, value15, 4.1); // +0
assertEquals(53, value17, 4.1); // +0
// 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);
......
......@@ -62,7 +62,7 @@ public class MethodCallThroughputAnalysis16 extends Analysis {
public void init() {
super.init();
Pipeline<Void, TimestampObject> producerPipeline = this.buildProducerPipeline(this.numInputObjects, this.inputObjectCreator);
this.producerThread = new Thread(new RunnableStage(producerPipeline));
this.producerThread = new Thread(new RunnableStage<Void>(producerPipeline));
this.numWorkerThreads = Math.min(NUM_WORKER_THREADS, this.numWorkerThreads);
......@@ -71,8 +71,8 @@ public class MethodCallThroughputAnalysis16 extends Analysis {
List<TimestampObject> resultList = new ArrayList<TimestampObject>(this.numInputObjects);
this.timestampObjectsList.add(resultList);
Runnable workerRunnable = this.buildPipeline(producerPipeline, resultList);
this.workerThreads[i] = new Thread(workerRunnable);
Pipeline<TimestampObject, Void> workerPipeline = this.buildPipeline(producerPipeline, resultList);
this.workerThreads[i] = new Thread(new RunnableStage<TimestampObject>(workerPipeline));
}
// this.producerThread.start();
......@@ -102,7 +102,7 @@ public class MethodCallThroughputAnalysis16 extends Analysis {
* @param numNoopFilters
* @since 1.10
*/
private Runnable buildPipeline(final StageWithPort<Void, TimestampObject> previousStage, final List<TimestampObject> timestampObjects) {
private Pipeline<TimestampObject, Void> buildPipeline(final StageWithPort<Void, TimestampObject> previousStage, final List<TimestampObject> timestampObjects) {
Relay<TimestampObject> relay = new Relay<TimestampObject>();
@SuppressWarnings("unchecked")
final NoopFilter<TimestampObject>[] noopFilters = new NoopFilter[this.numNoopFilters];
......@@ -132,7 +132,7 @@ public class MethodCallThroughputAnalysis16 extends Analysis {
SingleElementPipe.connect(noopFilters[noopFilters.length - 1].getOutputPort(), stopTimestampFilter.getInputPort());
SingleElementPipe.connect(stopTimestampFilter.getOutputPort(), collectorSink.getInputPort());
return new RunnableStage(pipeline);
return pipeline;
}
@Override
......
......@@ -61,7 +61,7 @@ public class MethodCallThroughputAnalysis17 extends Analysis {
@Override
public void init() {
final Pipeline<Void, TimestampObject> producerPipeline = this.buildProducerPipeline(this.numInputObjects, this.inputObjectCreator);
this.producerThread = new Thread(new RunnableStage(producerPipeline));
this.producerThread = new Thread(new RunnableStage<Void>(producerPipeline));
int numWorkerThreads = Math.min(NUM_WORKER_THREADS, 1); // only for testing purpose
......@@ -95,7 +95,7 @@ public class MethodCallThroughputAnalysis17 extends Analysis {
// this.producerThread.start();
// this.producerThread.run();
new RunnableStage(producerPipeline).run();
new RunnableStage<Void>(producerPipeline).run();
// try {
// this.producerThread.join();
......@@ -155,7 +155,7 @@ public class MethodCallThroughputAnalysis17 extends Analysis {
pipeline.addIntermediateStage(stopTimestampFilter);
pipeline.setLastStage(collectorSink);
SpScPipe.connect(null, relay.getInputPort(), SPSC_INITIAL_CAPACITY);
relay.getInputPort().setPipe(new SpScPipe<TimestampObject>(SPSC_INITIAL_CAPACITY));
IPipe<TimestampObject> startPipe = relay.getInputPort().getPipe();
for (int i = 0; i < this.numInputObjects; i++) {
startPipe.add(this.inputObjectCreator.create());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment