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

Merge remote-tracking branch 'origin/master' into find-pipefact-conf

parents 12065de9 09033375
No related branches found
No related tags found
No related merge requests found
Showing
with 226 additions and 64 deletions
......@@ -172,20 +172,7 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
......@@ -220,22 +207,22 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
<!-- <executions> -->
<!-- <execution> -->
<!-- <phase>test</phase> -->
<!-- <configuration> -->
<!-- <configLocation>${project.basedir}/conf/quality-config/cs-conf.xml</configLocation> -->
<!-- <includeTestSourceDirectory>true</includeTestSourceDirectory> -->
<!-- <encoding>UTF-8</encoding> -->
<!-- <consoleOutput>true</consoleOutput> -->
<!-- <failsOnError>false</failsOnError> -->
<!-- <linkXRef>false</linkXRef> -->
<!-- </configuration> -->
<!-- <goals> -->
<!-- <goal>check</goal> -->
<!-- </goals> -->
<!-- </execution> -->
<!-- </executions> -->
<!-- <executions> -->
<!-- <execution> -->
<!-- <phase>test</phase> -->
<!-- <configuration> -->
<!-- <configLocation>${project.basedir}/conf/quality-config/cs-conf.xml</configLocation> -->
<!-- <includeTestSourceDirectory>true</includeTestSourceDirectory> -->
<!-- <encoding>UTF-8</encoding> -->
<!-- <consoleOutput>true</consoleOutput> -->
<!-- <failsOnError>false</failsOnError> -->
<!-- <linkXRef>false</linkXRef> -->
<!-- </configuration> -->
<!-- <goals> -->
<!-- <goal>check</goal> -->
<!-- </goals> -->
<!-- </execution> -->
<!-- </executions> -->
</plugin>
<!-- Findbugs -->
......@@ -346,6 +333,33 @@
<activation>
</activation>
</profile>
<profile>
<id>signing</id>
<activation>
<property>
<name>sign-jars</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
<stringAttribute key="M2_GOALS" value="-Psigning -Dmaven.javadoc.skip=true clean deploy"/>
<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
<booleanAttribute key="M2_OFFLINE" value="false"/>
<stringAttribute key="M2_PROFILES" value=""/>
<listAttribute key="M2_PROPERTIES"/>
<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
<intAttribute key="M2_THREADS" value="1"/>
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
<stringAttribute key="M2_USER_SETTINGS" value=""/>
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc}"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
<stringAttribute key="M2_GOALS" value="-Psigning -Dmaven.javadoc.skip=true install"/>
<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
<booleanAttribute key="M2_OFFLINE" value="false"/>
<stringAttribute key="M2_PROFILES" value=""/>
<listAttribute key="M2_PROPERTIES"/>
<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
<intAttribute key="M2_THREADS" value="1"/>
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
<stringAttribute key="M2_USER_SETTINGS" value=""/>
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 7 [1.7.0_25]"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc}"/>
</launchConfiguration>
......@@ -12,6 +12,9 @@
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
<stringAttribute key="M2_USER_SETTINGS" value=""/>
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc}"/>
</launchConfiguration>
......@@ -14,6 +14,9 @@
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.m2e.launching.MavenSourceLocator"/>
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;sourceLookupDirector&gt;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;folder nest=&amp;quot;false&amp;quot; path=&amp;quot;/teetime/src/perfomancetest&amp;quot;/&amp;gt;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.folder&quot;/&gt;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;default/&amp;gt;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#10;&lt;/sourceContainers&gt;&#10;&lt;/sourceLookupDirector&gt;&#10;"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc}"/>
</launchConfiguration>
......@@ -117,14 +117,14 @@ public abstract class AbstractStage implements Stage {
this.validateOutputPorts(invalidPortConnections);
}
public void onStarting() {
public void onStarting() throws Exception {
this.cachedInputPorts = this.inputPortList.toArray(new InputPort<?>[0]);
this.cachedOutputPorts = this.outputPortList.toArray(new OutputPort<?>[0]);
this.connectUnconnectedOutputPorts();
}
public void onTerminating() {
public void onTerminating() throws Exception {
// empty default implementation
}
......
package teetime.framework.signal;
import java.util.LinkedList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import teetime.framework.AbstractStage;
public class StartingSignal implements ISignal {
private static final Logger LOGGER = LoggerFactory.getLogger(StartingSignal.class);
private final List<Exception> catchedExceptions = new LinkedList<Exception>();
@Override
public void trigger(final AbstractStage stage) {
stage.onStarting();
try {
stage.onStarting();
} catch (Exception e) {
catchedExceptions.add(e);
LOGGER.error("Exception while sending the start signal", e);
}
}
public List<Exception> getCatchedExceptions() {
return catchedExceptions;
}
}
package teetime.framework.signal;
import java.util.LinkedList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import teetime.framework.AbstractStage;
public class TerminatingSignal implements ISignal {
private static final Logger LOGGER = LoggerFactory.getLogger(TerminatingSignal.class);
private final List<Exception> catchedExceptions = new LinkedList<Exception>();
@Override
public void trigger(final AbstractStage stage) {
stage.onTerminating();
try {
stage.onTerminating();
} catch (Exception e) {
catchedExceptions.add(e);
LOGGER.error("Exception while sending the start signal", e);
}
}
public List<Exception> getCatchedExceptions() {
return catchedExceptions;
}
}
......@@ -20,8 +20,7 @@ public class Cache<T> extends ConsumerStage<T> {
}
@Override
public void onTerminating() {
super.onTerminating();
public void onTerminating() throws Exception {
this.logger.debug("Emitting " + this.cachedObjects.size() + " cached elements...");
StopWatch stopWatch = new StopWatch();
stopWatch.start();
......
......@@ -45,9 +45,9 @@ public class CollectorSink<T> extends ConsumerStage<T> {
}
@Override
public void onTerminating() {
super.onTerminating();
public void onTerminating() throws Exception {
System.out.println("size: " + this.elements.size());
super.onTerminating();
}
@Override
......
......@@ -29,9 +29,9 @@ public class ElementDelayMeasuringStage<T> extends ConsumerStage<T> {
}
@Override
public void onStarting() {
this.resetTimestamp(System.nanoTime());
public void onStarting() throws Exception {
super.onStarting();
this.resetTimestamp(System.nanoTime());
}
private void computeElementDelay(final Long timestampInNs) {
......
......@@ -30,9 +30,9 @@ public class ElementThroughputMeasuringStage<T> extends ConsumerStage<T> {
}
@Override
public void onStarting() {
this.resetTimestamp(System.nanoTime());
public void onStarting() throws Exception {
super.onStarting();
this.resetTimestamp(System.nanoTime());
}
private void computeElementThroughput(final Long timestampInNs) {
......
......@@ -25,9 +25,9 @@ public class Relay<T> extends ProducerStage<T> {
}
@Override
public void onStarting() {
this.cachedCastedInputPipe = (InterThreadPipe) this.inputPort.getPipe();
public void onStarting() throws Exception {
super.onStarting();
this.cachedCastedInputPipe = (InterThreadPipe) this.inputPort.getPipe();
}
public InputPort<T> getInputPort() {
......
......@@ -34,11 +34,11 @@ public class Delay<T> extends AbstractStage {
}
@Override
public void onTerminating() {
super.onTerminating();
public void onTerminating() throws Exception {
while (!this.inputPort.getPipe().isEmpty()) {
this.executeWithPorts();
}
super.onTerminating();
}
public InputPort<T> getInputPort() {
......
......@@ -37,15 +37,6 @@ public class Distributor<T> extends ConsumerStage<T> {
this.strategy.distribute((OutputPort<T>[]) this.getOutputPorts(), element);
}
@Override
public void onTerminating() {
super.onTerminating();
// for (OutputPort<T> op : this.outputPortList) {
// op.getPipe().close();
// System.out.println("End signal sent, size: " + op.getPipe().size());
// }
}
public OutputPort<T> getNewOutputPort() {
return this.createOutputPort();
}
......
......@@ -62,9 +62,9 @@ public class Merger<T> extends AbstractStage {
}
@Override
public void onTerminating() {
super.onTerminating();
public void onTerminating() throws Exception {
this.finishedInputPorts++;
super.onTerminating();
}
public IMergerStrategy<T> getStrategy() {
......
package teetime.stage.io;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.BufferUnderflowException;
import java.nio.ByteBuffer;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import teetime.framework.ProducerStage;
public abstract class AbstractTcpReader<T> extends ProducerStage<T> {
private final int port;
private final int bufferCapacity;
public AbstractTcpReader(final int port, final int bufferCapacity) {
super();
this.port = port;
this.bufferCapacity = bufferCapacity;
}
@Override
protected void execute() {
ServerSocketChannel serversocket = null;
try {
serversocket = ServerSocketChannel.open();
serversocket.socket().bind(new InetSocketAddress(this.port));
logger.debug("Listening on port " + this.port);
final SocketChannel socketChannel = serversocket.accept();
try {
final ByteBuffer buffer = ByteBuffer.allocateDirect(bufferCapacity);
while (socketChannel.read(buffer) != -1) {
process(buffer);
}
} finally {
socketChannel.close();
}
} catch (final IOException ex) {
logger.error("Error while reading", ex);
} finally {
if (null != serversocket) {
try {
serversocket.close();
} catch (final IOException e) {
logger.debug("Failed to close TCP connection!", e);
}
}
this.terminate();
}
}
private void process(final ByteBuffer buffer) {
buffer.flip();
try {
while (buffer.hasRemaining()) {
buffer.mark();
this.read(buffer);
}
buffer.clear();
} catch (final BufferUnderflowException ex) {
buffer.reset();
buffer.compact();
}
}
protected abstract void read(final ByteBuffer buffer);
}
......@@ -86,13 +86,13 @@ public class Printer<T> extends ConsumerStage<T> {
}
@Override
public void onStarting() {
public void onStarting() throws Exception {
super.onStarting();
this.initializeStream();
}
@Override
public void onTerminating() {
public void onTerminating() throws Exception {
this.closeStream();
super.onTerminating();
}
......
......@@ -25,7 +25,7 @@ import teetime.stage.stringBuffer.util.KiekerHashMap;
/**
* @author Christian Wulf
*
*
* @since 1.10
*/
public class StringBufferFilter<T> extends ConsumerStage<T> {
......@@ -44,12 +44,12 @@ public class StringBufferFilter<T> extends ConsumerStage<T> {
}
@Override
public void onStarting() {
public void onStarting() throws Exception {
super.onStarting();
for (final AbstractDataTypeHandler<?> handler : this.dataTypeHandlers) {
handler.setLogger(this.logger);
handler.setStringRepository(this.kiekerHashMap);
}
super.onStarting();
}
private T handle(final T object) {
......
......@@ -65,8 +65,12 @@ public class ChwHomeComparisonMethodcallWithPorts extends ProfiledPerformanceAss
// assertEquals(53, value17, 4.1); // +0
// since 31.08.2014 (incl.)
assertEquals(68, value15, 4.1); // ??
assertEquals(75, value17, 4.1); // ??
// assertEquals(68, value15, 4.1); // +24
// assertEquals(75, value17, 4.1); // +22
// since 04.11.2014 (incl.)
assertEquals(40, value15, 4.1); // -28
assertEquals(78, value17, 4.1); // +3
// 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);
......
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