Skip to content
Snippets Groups Projects
Commit e88c7f79 authored by Florian Fittkau's avatar Florian Fittkau
Browse files

WiP

parent 652eb69a
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,7 @@ class TraceReconstructionBuffer {
// reconstruction
final RuntimeStatisticInformation runtimeStatisticInformation = runtimeStatisticInformationList
.get(0);
if (runtimeStatisticInformation.getAverage() < 0) {
if (!runtimeStatisticInformation.isInitialized()) {
runtimeStatisticInformation.set(1, methodDuration, methodDuration
* methodDuration);
}
......
......@@ -64,23 +64,26 @@ class TracesSummarizationBuffer {
.get(indexInHostList1);
final RuntimeStatisticInformation runtime2 = runtimeList2.get(j);
if ((runtimeList1.size() == 1) && (runtimeList2.size() == 1)) {
if (!runtime2.isInitialized()) {
runtime1.merge(runtime2,
getRightObjectId(abstractBeforeEventRecord2));
} else {
runtime1.merge(runtime2);
}
} else {
// not found, so insert and merge later
// not found, so insert later
toAdd.put(host2, runtimeList2.get(j));
System.out.println("not found...");
}
}
for (final Entry<HostApplicationMetaDataRecord, RuntimeStatisticInformation> entry : toAdd
.entrySet()) {
hostMetaList1.add(entry.getKey());
runtimeList1.add(entry.getValue());
final RuntimeStatisticInformation runtime2 = entry.getValue();
if (!runtime2.isInitialized()) {
runtime2.makeAccumulator(getRightObjectId(abstractBeforeEventRecord2));
}
runtimeList1.add(runtime2);
}
} else {
final List<HostApplicationMetaDataRecord> hostMetaList1 = event
......
......@@ -76,13 +76,19 @@ public class TracesSummarizationFilter extends AbstractFilter {
traceAggregationBuffer.insertTrace(trace);
}
public void makeTraceElementsAccumulator(final Trace trace) {
private void makeTraceElementsAccumulator(final Trace trace) {
final List<AbstractEventRecord> traceEvents = trace.getTraceEvents();
for (final AbstractEventRecord event : traceEvents) {
if (event instanceof AbstractBeforeEventRecord) {
final AbstractBeforeEventRecord abstractBeforeEventRecord = (AbstractBeforeEventRecord) event;
final List<RuntimeStatisticInformation> runtimeStatisticInformationList = abstractBeforeEventRecord
.getRuntimeStatisticInformationList();
if (runtimeStatisticInformationList.size() == 1) {
final RuntimeStatisticInformation runtimeStatisticInformation = runtimeStatisticInformationList
.get(0);
if (!runtimeStatisticInformation.isInitialized()) {
int objectId = 0;
if (abstractBeforeEventRecord instanceof AbstractBeforeOperationEventRecord) {
......@@ -90,10 +96,8 @@ public class TracesSummarizationFilter extends AbstractFilter {
objectId = abstractBeforeOperationEventRecord.getObjectId();
}
final List<RuntimeStatisticInformation> runtimeStatisticInformationList = abstractBeforeEventRecord
.getRuntimeStatisticInformationList();
if (runtimeStatisticInformationList.size() == 1) {
runtimeStatisticInformationList.get(0).makeAccumulator(objectId);
runtimeStatisticInformation.makeAccumulator(objectId);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment