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

added RunnableStage

parent 48e233e2
No related branches found
No related tags found
No related merge requests found
...@@ -88,18 +88,7 @@ public class MethodCallThroughputAnalysis16 extends Analysis { ...@@ -88,18 +88,7 @@ public class MethodCallThroughputAnalysis16 extends Analysis {
UnorderedGrowablePipe.connect(objectProducer.getOutputPort(), this.distributor.getInputPort()); UnorderedGrowablePipe.connect(objectProducer.getOutputPort(), this.distributor.getInputPort());
final Runnable runnable = new Runnable() { return new RunnableStage(pipeline);
@Override
public void run() {
pipeline.onStart();
do {
pipeline.executeWithPorts();
} while (pipeline.isReschedulable());
// System.out.println("buildProducerPipeline finished");
}
};
return runnable;
} }
/** /**
...@@ -136,18 +125,7 @@ public class MethodCallThroughputAnalysis16 extends Analysis { ...@@ -136,18 +125,7 @@ public class MethodCallThroughputAnalysis16 extends Analysis {
UnorderedGrowablePipe.connect(noopFilters[noopFilters.length - 1].getOutputPort(), stopTimestampFilter.getInputPort()); UnorderedGrowablePipe.connect(noopFilters[noopFilters.length - 1].getOutputPort(), stopTimestampFilter.getInputPort());
UnorderedGrowablePipe.connect(stopTimestampFilter.getOutputPort(), collectorSink.getInputPort()); UnorderedGrowablePipe.connect(stopTimestampFilter.getOutputPort(), collectorSink.getInputPort());
final Runnable runnable = new Runnable() { return new RunnableStage(pipeline);
@Override
public void run() {
pipeline.onStart();
do {
pipeline.executeWithPorts();
} while (pipeline.isReschedulable());
// System.out.println("buildPipeline finished");
}
};
return runnable;
} }
@Override @Override
......
package teetime.examples.throughput.methodcall;
public class RunnableStage implements Runnable {
private final StageWithPort<?, ?> stage;
public RunnableStage(final StageWithPort<?, ?> stage) {
this.stage = stage;
}
@Override
public void run() {
this.stage.onStart();
do {
this.stage.executeWithPorts();
} while (this.stage.isReschedulable());
}
}
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