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

added experiment data

parent 46c8da3f
No related branches found
No related tags found
No related merge requests found
#FindBugs User Preferences
#Fri Dec 19 11:02:39 CET 2014
#Fri Dec 19 11:06:26 CET 2014
detector_threshold=3
effort=max
excludefilter0=.fbExcludeFilterFile|true
......
......@@ -25,6 +25,8 @@ import java.nio.channels.SocketChannel;
import teetime.stage.io.AbstractTcpReader;
import com.google.common.base.Joiner;
import kieker.common.exception.RecordInstantiationException;
import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
......@@ -87,9 +89,9 @@ public class TcpReader extends AbstractTcpReader<IMonitoringRecord> {
outputPort.send(record);
} catch (final BufferUnderflowException ex) {
super.logger.error("Failed to create record.", ex);
super.logger.error("Failed to create: " + recordClassName, ex);
} catch (final RecordInstantiationException ex) {
super.logger.error("Failed to create record.", ex);
super.logger.error("Failed to create: " + recordClassName, ex);
}
}
......@@ -145,6 +147,7 @@ public class TcpReader extends AbstractTcpReader<IMonitoringRecord> {
while (buffer.hasRemaining()) {
buffer.mark();
RegistryRecord.registerRecordInRegistry(buffer, this.stringRegistry);
System.out.println("NEW: " + Joiner.on("\n").join(stringRegistry.getAll()));
}
buffer.clear();
} catch (final BufferUnderflowException ex) {
......
package teetime.examples.kiekerdays;
import java.util.Collection;
import teetime.framework.Analysis;
import teetime.framework.AnalysisConfiguration;
import teetime.framework.Stage;
import teetime.framework.RunnableStage;
import teetime.stage.io.network.TcpReader;
import teetime.util.Pair;
public class TcpTraceLogging {
private Thread tcpThread;
public class TcpTraceLoggingConfiguration extends AnalysisConfiguration {
public void init() {
public TcpTraceLoggingConfiguration() {
Stage tcpPipeline = this.buildTcpPipeline();
this.tcpThread = new Thread(new RunnableStage(tcpPipeline));
}
public void start() {
this.tcpThread.start();
try {
this.tcpThread.join();
} catch (InterruptedException e) {
throw new IllegalStateException(e);
}
addThreadableStage(tcpPipeline);
}
private Stage buildTcpPipeline() {
......@@ -32,12 +23,14 @@ public class TcpTraceLogging {
}
public static void main(final String[] args) {
final TcpTraceLogging analysis = new TcpTraceLogging();
final TcpTraceLoggingConfiguration configuration = new TcpTraceLoggingConfiguration();
Analysis analysis = new Analysis(configuration);
analysis.init();
try {
analysis.start();
} finally {
Collection<Pair<Thread, Throwable>> exceptions = analysis.start();
if (!exceptions.isEmpty()) {
throw new IllegalStateException();
}
}
......
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