Commit c73b54db authored by Florian Fittkau's avatar Florian Fittkau

runtime statistics created at first real usage

parent 8127cb34
......@@ -10,6 +10,7 @@ import explorviz.live_trace_processing.record.event.AbstractAfterEventRecord;
import explorviz.live_trace_processing.record.event.AbstractAfterFailedEventRecord;
import explorviz.live_trace_processing.record.event.AbstractBeforeEventRecord;
import explorviz.live_trace_processing.record.event.AbstractEventRecord;
import explorviz.live_trace_processing.record.trace.RuntimeStatisticInformation;
import explorviz.live_trace_processing.record.trace.Trace;
class TraceReconstructionBuffer {
......@@ -85,7 +86,8 @@ class TraceReconstructionBuffer {
final AbstractBeforeEventRecord beforeEvent = stack.pop();
final long time = event.getLoggingTimestamp() - beforeEvent.getLoggingTimestamp();
beforeEvent.getRuntime().set(time);
beforeEvent.setRuntimeStatisticInformation(new RuntimeStatisticInformation(1, time,
time * time));
}
}
return new Trace(events, valid);
......
......@@ -35,8 +35,8 @@ class TracePatternSummarizationBuffer {
final AbstractBeforeEventRecord abstractBeforeEventRecord = (AbstractBeforeEventRecord) event;
final AbstractBeforeEventRecord abstractBeforeEventRecord2 = (AbstractBeforeEventRecord) records
.get(i);
abstractBeforeEventRecord.getRuntime().merge(
abstractBeforeEventRecord2.getRuntime());
abstractBeforeEventRecord.getRuntimeStatisticInformation().merge(
abstractBeforeEventRecord2.getRuntimeStatisticInformation());
}
}
}
......
......@@ -15,7 +15,7 @@ public class FilterConfiguration {
public static void configureAndStartFilters(final Configuration configuration,
final ITraceSink sink) {
final ITraceReduction traceReduction = new TracePatternSummarizationFilter(
TimeUnit.SECONDS.toNanos(1), sink);
TimeUnit.MILLISECONDS.toNanos(990), sink);
final ITraceReconstruction traceReconstruction = new TraceReconstructionFilter(
TimeUnit.SECONDS.toNanos(4), traceReduction);
......
......@@ -28,7 +28,6 @@ import explorviz.live_trace_processing.record.misc.StringRegistryRecord;
import explorviz.live_trace_processing.record.misc.SystemMonitoringRecord;
import explorviz.live_trace_processing.record.misc.TimedPeriodRecord;
import explorviz.live_trace_processing.record.trace.HostApplicationMetaDataRecord;
import explorviz.live_trace_processing.record.trace.RuntimeStatisticInformation;
import explorviz.live_trace_processing.record.trace.Trace;
public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalReceiver {
......@@ -284,7 +283,7 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
final String operation = stringRegistry.getStringFromId(operationId);
putInRingBuffer(new BeforeOperationEventRecord(timestamp, traceId, orderIndex,
objectId, operation, hostApplicationMetadata, new RuntimeStatisticInformation()));
objectId, operation, hostApplicationMetadata));
} catch (final IdNotAvailableException e) {
putInWaitingMessages(buffer, BeforeOperationEventRecord.COMPRESSED_BYTE_LENGTH + 1);
}
......@@ -335,7 +334,7 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
final String operation = stringRegistry.getStringFromId(operationId);
putInRingBuffer(new BeforeConstructorEventRecord(timestamp, traceId, orderIndex,
objectId, operation, hostApplicationMetadata, new RuntimeStatisticInformation()));
objectId, operation, hostApplicationMetadata));
} catch (final IdNotAvailableException e) {
putInWaitingMessages(buffer,
BeforeConstructorEventRecord.COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID);
......@@ -378,7 +377,7 @@ public class TCPReaderOneClient extends Thread implements IPeriodicTimeSignalRec
final String operation = stringRegistry.getStringFromId(operationId);
putInRingBuffer(new BeforeStaticOperationEventRecord(timestamp, traceId, orderIndex,
operation, hostApplicationMetadata, new RuntimeStatisticInformation()));
operation, hostApplicationMetadata));
} catch (final IdNotAvailableException e) {
putInWaitingMessages(buffer,
BeforeStaticOperationEventRecord.COMPRESSED_BYTE_LENGTH_WITH_CLAZZ_ID);
......
......@@ -6,7 +6,6 @@ import org.junit.Test;
import explorviz.live_trace_processing.record.event.normal.BeforeOperationEventRecord;
import explorviz.live_trace_processing.record.trace.HostApplicationMetaDataRecord;
import explorviz.live_trace_processing.record.trace.RuntimeStatisticInformation;
public class TraceReconstructionBufferTest {
......@@ -14,8 +13,7 @@ public class TraceReconstructionBufferTest {
public void testInsertEvent() throws Exception {
final TraceReconstructionBuffer traceReconstructionBuffer = new TraceReconstructionBuffer();
traceReconstructionBuffer.insertEvent(new BeforeOperationEventRecord(1000, 1, 0, 0, "test",
new HostApplicationMetaDataRecord("testHost", "testApp"),
new RuntimeStatisticInformation()));
new HostApplicationMetaDataRecord("testHost", "testApp")));
assertTrue(true); // TODO
}
......
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