Commit b4bcb5a5 authored by Florian Fittkau's avatar Florian Fittkau

add debuging

parent 96f411e4
......@@ -3,4 +3,5 @@
/dist
/reports
/xtend-gen
Thumbs.db
\ No newline at end of file
Thumbs.db
debug.trace
\ No newline at end of file
explorviz.live_trace_processing.host_name=
explorviz.live_trace_processing.application_name=
explorviz.live_trace_processing.debug=false
explorviz.live_trace_processing.monitoring_enabled=true
explorviz.live_trace_processing.system_monitoring_enabled=true
......@@ -14,15 +16,4 @@ explorviz.live_trace_processing.writer_load_balancing_wait_time=20000
explorviz.live_trace_processing.writer_load_balancing_scaling_group=analysis-worker
explorviz.live_trace_processing.sending_buffer_size=65536
explorviz.live_trace_processing.monitoring_controller_disruptor_size=32
explorviz.live_trace_processing.tcp_reader_output_buffer_size=8192
explorviz.live_trace_processing.tcp_reader_disruptor_size=32
explorviz.live_trace_processing.trace_reconstruction_output_buffer_size=512
explorviz.live_trace_processing.trace_reconstruction_disruptor_size=32
explorviz.live_trace_processing.trace_reconstruction_buffer_initial_size=128
explorviz.live_trace_processing.trace_summarization_output_buffer_size=64
explorviz.live_trace_processing.trace_summarization_disruptor_size=16
\ No newline at end of file
explorviz.live_trace_processing.monitoring_controller_disruptor_size=32
\ No newline at end of file
explorviz.live_trace_processing.host_name=
explorviz.live_trace_processing.application_name=
explorviz.live_trace_processing.debug=false
explorviz.live_trace_processing.monitoring_enabled=false
explorviz.live_trace_processing.system_monitoring_enabled=true
explorviz.live_trace_processing.writer_target_ip=127.0.0.1
explorviz.live_trace_processing.writer_target_port=10133
explorviz.live_trace_processing.writer_load_balancing_enabled=false
explorviz.live_trace_processing.writer_load_balancing_ip=10.50.0.2
explorviz.live_trace_processing.writer_load_balancing_port=9999
explorviz.live_trace_processing.writer_load_balancing_wait_time=20000
explorviz.live_trace_processing.writer_load_balancing_scaling_group=analysis-worker
explorviz.live_trace_processing.sending_buffer_size=65536
explorviz.live_trace_processing.monitoring_controller_disruptor_size=32
\ No newline at end of file
......@@ -12,11 +12,16 @@ import com.lmax.disruptor.EventHandler;
import explorviz.live_trace_processing.configuration.Configuration;
import explorviz.live_trace_processing.configuration.ConfigurationFactory;
import explorviz.live_trace_processing.debug.DebugFileByteBufferWriter;
import explorviz.live_trace_processing.main.ByteBufferEvent;
import explorviz.live_trace_processing.main.MonitoringStringRegistry;
import explorviz.live_trace_processing.record.event.HostApplicationMetaDataRecord;
public class TCPWriter implements EventHandler<ByteBufferEvent>, IWriter {
private final boolean debug;
private DebugFileByteBufferWriter debugWriter;
private URL providerURL;
private SocketChannel socketChannel;
......@@ -35,6 +40,11 @@ public class TCPWriter implements EventHandler<ByteBufferEvent>, IWriter {
} catch (final MalformedURLException e) {
e.printStackTrace();
}
debug = configuration.getBooleanProperty(ConfigurationFactory.DEBUG);
if (debug) {
debugWriter = new DebugFileByteBufferWriter("debug.trace");
}
}
@Override
......@@ -103,6 +113,9 @@ public class TCPWriter implements EventHandler<ByteBufferEvent>, IWriter {
while ((socketChannel == null) || (!socketChannel.isConnected())) {
Thread.sleep(1);
}
if (debug) {
debugWriter.writeBuffer(buffer);
}
send(buffer);
buffer.clear();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment