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

restructured packages

parent fe806ff3
No related branches found
No related tags found
No related merge requests found
Showing
with 79 additions and 12 deletions
[increases overhead]
-for loop with list vs. array (due to new instantiation of iterator)
-for loop with super type vs. concrete type (due to less JIT optimization possibilities)
-
[irrelevant w.r.t. overhead]
-foreach vs. index-based iteration
-iterative vs. recursive execution
-
\ No newline at end of file
...@@ -19,6 +19,11 @@ import java.util.List; ...@@ -19,6 +19,11 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.stage.CollectorSink;
import teetime.examples.throughput.methodcall.stage.NoopFilter;
import teetime.examples.throughput.methodcall.stage.ObjectProducer;
import teetime.examples.throughput.methodcall.stage.StartTimestampFilter;
import teetime.examples.throughput.methodcall.stage.StopTimestampFilter;
import teetime.framework.core.Analysis; import teetime.framework.core.Analysis;
/** /**
......
...@@ -19,6 +19,12 @@ import java.util.List; ...@@ -19,6 +19,12 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.stage.CollectorSink;
import teetime.examples.throughput.methodcall.stage.NoopFilter;
import teetime.examples.throughput.methodcall.stage.ObjectProducer;
import teetime.examples.throughput.methodcall.stage.Pipeline;
import teetime.examples.throughput.methodcall.stage.StartTimestampFilter;
import teetime.examples.throughput.methodcall.stage.StopTimestampFilter;
import teetime.framework.core.Analysis; import teetime.framework.core.Analysis;
import teetime.util.list.CommittableQueue; import teetime.util.list.CommittableQueue;
import teetime.util.list.CommittableResizableArrayQueue; import teetime.util.list.CommittableResizableArrayQueue;
......
...@@ -21,6 +21,11 @@ import java.util.List; ...@@ -21,6 +21,11 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.stage.CollectorSink;
import teetime.examples.throughput.methodcall.stage.NoopFilter;
import teetime.examples.throughput.methodcall.stage.ObjectProducer;
import teetime.examples.throughput.methodcall.stage.StartTimestampFilter;
import teetime.examples.throughput.methodcall.stage.StopTimestampFilter;
import teetime.framework.core.Analysis; import teetime.framework.core.Analysis;
/** /**
......
...@@ -21,6 +21,11 @@ import java.util.List; ...@@ -21,6 +21,11 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.stage.CollectorSink;
import teetime.examples.throughput.methodcall.stage.NoopFilter;
import teetime.examples.throughput.methodcall.stage.ObjectProducer;
import teetime.examples.throughput.methodcall.stage.StartTimestampFilter;
import teetime.examples.throughput.methodcall.stage.StopTimestampFilter;
import teetime.framework.core.Analysis; import teetime.framework.core.Analysis;
/** /**
......
...@@ -21,6 +21,11 @@ import java.util.List; ...@@ -21,6 +21,11 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.stage.CollectorSink;
import teetime.examples.throughput.methodcall.stage.NoopFilter;
import teetime.examples.throughput.methodcall.stage.ObjectProducer;
import teetime.examples.throughput.methodcall.stage.StartTimestampFilter;
import teetime.examples.throughput.methodcall.stage.StopTimestampFilter;
import teetime.framework.core.Analysis; import teetime.framework.core.Analysis;
/** /**
......
...@@ -21,6 +21,11 @@ import java.util.List; ...@@ -21,6 +21,11 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.stage.CollectorSink;
import teetime.examples.throughput.methodcall.stage.NoopFilter;
import teetime.examples.throughput.methodcall.stage.ObjectProducer;
import teetime.examples.throughput.methodcall.stage.StartTimestampFilter;
import teetime.examples.throughput.methodcall.stage.StopTimestampFilter;
import teetime.framework.core.Analysis; import teetime.framework.core.Analysis;
/** /**
......
...@@ -21,6 +21,11 @@ import java.util.List; ...@@ -21,6 +21,11 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.stage.CollectorSink;
import teetime.examples.throughput.methodcall.stage.NoopFilter;
import teetime.examples.throughput.methodcall.stage.ObjectProducer;
import teetime.examples.throughput.methodcall.stage.StartTimestampFilter;
import teetime.examples.throughput.methodcall.stage.StopTimestampFilter;
import teetime.framework.core.Analysis; import teetime.framework.core.Analysis;
/** /**
......
...@@ -21,6 +21,11 @@ import java.util.List; ...@@ -21,6 +21,11 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.stage.CollectorSink;
import teetime.examples.throughput.methodcall.stage.NoopFilter;
import teetime.examples.throughput.methodcall.stage.ObjectProducer;
import teetime.examples.throughput.methodcall.stage.StartTimestampFilter;
import teetime.examples.throughput.methodcall.stage.StopTimestampFilter;
import teetime.framework.core.Analysis; import teetime.framework.core.Analysis;
/** /**
......
...@@ -19,6 +19,12 @@ import java.util.List; ...@@ -19,6 +19,12 @@ import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.stage.CollectorSink;
import teetime.examples.throughput.methodcall.stage.NoopFilter;
import teetime.examples.throughput.methodcall.stage.ObjectProducer;
import teetime.examples.throughput.methodcall.stage.Pipeline;
import teetime.examples.throughput.methodcall.stage.StartTimestampFilter;
import teetime.examples.throughput.methodcall.stage.StopTimestampFilter;
import teetime.framework.core.Analysis; import teetime.framework.core.Analysis;
/** /**
......
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.throughput.methodcall; package teetime.examples.throughput.methodcall.stage;
import java.util.List; import java.util.List;
import teetime.examples.throughput.methodcall.ConsumerStage;
import teetime.util.list.CommittableQueue; import teetime.util.list.CommittableQueue;
/** /**
......
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.throughput.methodcall; package teetime.examples.throughput.methodcall.stage;
import teetime.examples.throughput.methodcall.ConsumerStage;
import teetime.util.list.CommittableQueue; import teetime.util.list.CommittableQueue;
/** /**
...@@ -44,7 +45,7 @@ public class NoopFilter<T> extends ConsumerStage<T, T> { ...@@ -44,7 +45,7 @@ public class NoopFilter<T> extends ConsumerStage<T, T> {
@Override @Override
protected void execute5(final T element) { protected void execute5(final T element) {
this.send(element); this.send(element); // "send" calls the next stage and so on
} }
} }
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.throughput.methodcall; package teetime.examples.throughput.methodcall.stage;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import teetime.examples.throughput.methodcall.ProducerStage;
import teetime.util.list.CommittableQueue; import teetime.util.list.CommittableQueue;
/** /**
......
package teetime.examples.throughput.methodcall; package teetime.examples.throughput.methodcall.stage;
import java.util.Arrays; import java.util.Arrays;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import teetime.examples.throughput.methodcall.InputPort;
import teetime.examples.throughput.methodcall.OnDisableListener;
import teetime.examples.throughput.methodcall.OutputPort;
import teetime.examples.throughput.methodcall.SchedulingInformation;
import teetime.examples.throughput.methodcall.Stage;
import teetime.examples.throughput.methodcall.StageWithPort;
import teetime.util.list.CommittableQueue; import teetime.util.list.CommittableQueue;
public class Pipeline<I, O> implements StageWithPort<I, O>, OnDisableListener { public class Pipeline<I, O> implements StageWithPort<I, O>, OnDisableListener {
...@@ -22,19 +28,19 @@ public class Pipeline<I, O> implements StageWithPort<I, O>, OnDisableListener { ...@@ -22,19 +28,19 @@ public class Pipeline<I, O> implements StageWithPort<I, O>, OnDisableListener {
private boolean reschedulable; private boolean reschedulable;
void setFirstStage(final StageWithPort<I, ?> stage) { public void setFirstStage(final StageWithPort<I, ?> stage) {
this.firstStage = stage; this.firstStage = stage;
} }
void addIntermediateStages(final StageWithPort... stages) { public void addIntermediateStages(final StageWithPort... stages) {
this.intermediateStages.addAll(Arrays.asList(stages)); this.intermediateStages.addAll(Arrays.asList(stages));
} }
void addIntermediateStage(final StageWithPort stage) { public void addIntermediateStage(final StageWithPort stage) {
this.intermediateStages.add(stage); this.intermediateStages.add(stage);
} }
void setLastStage(final StageWithPort<?, O> stage) { public void setLastStage(final StageWithPort<?, O> stage) {
this.lastStage = stage; this.lastStage = stage;
} }
...@@ -66,7 +72,7 @@ public class Pipeline<I, O> implements StageWithPort<I, O>, OnDisableListener { ...@@ -66,7 +72,7 @@ public class Pipeline<I, O> implements StageWithPort<I, O>, OnDisableListener {
this.setReschedulable(this.stages[0].isReschedulable()); this.setReschedulable(this.stages[0].isReschedulable());
} }
void onStart() { public void onStart() {
// Pipe pipe = new Pipe(); // Pipe pipe = new Pipe();
// this.outputPort.pipe = pipe; // this.outputPort.pipe = pipe;
// this.firstStage.getInputPort().pipe = pipe; // this.firstStage.getInputPort().pipe = pipe;
......
...@@ -13,9 +13,10 @@ ...@@ -13,9 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.throughput.methodcall; package teetime.examples.throughput.methodcall.stage;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.ConsumerStage;
import teetime.util.list.CommittableQueue; import teetime.util.list.CommittableQueue;
/** /**
......
...@@ -13,9 +13,10 @@ ...@@ -13,9 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.throughput.methodcall; package teetime.examples.throughput.methodcall.stage;
import teetime.examples.throughput.TimestampObject; import teetime.examples.throughput.TimestampObject;
import teetime.examples.throughput.methodcall.ConsumerStage;
import teetime.util.list.CommittableQueue; import teetime.util.list.CommittableQueue;
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment