Commit e88c7f79 authored by Florian Fittkau's avatar Florian Fittkau

WiP

parent 652eb69a
......@@ -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,24 +76,28 @@ 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;
int objectId = 0;
if (abstractBeforeEventRecord instanceof AbstractBeforeOperationEventRecord) {
final AbstractBeforeOperationEventRecord abstractBeforeOperationEventRecord = (AbstractBeforeOperationEventRecord) abstractBeforeEventRecord;
objectId = abstractBeforeOperationEventRecord.getObjectId();
}
final List<RuntimeStatisticInformation> runtimeStatisticInformationList = abstractBeforeEventRecord
.getRuntimeStatisticInformationList();
if (runtimeStatisticInformationList.size() == 1) {
runtimeStatisticInformationList.get(0).makeAccumulator(objectId);
final RuntimeStatisticInformation runtimeStatisticInformation = runtimeStatisticInformationList
.get(0);
if (!runtimeStatisticInformation.isInitialized()) {
int objectId = 0;
if (abstractBeforeEventRecord instanceof AbstractBeforeOperationEventRecord) {
final AbstractBeforeOperationEventRecord abstractBeforeOperationEventRecord = (AbstractBeforeOperationEventRecord) abstractBeforeEventRecord;
objectId = abstractBeforeOperationEventRecord.getObjectId();
}
runtimeStatisticInformation.makeAccumulator(objectId);
}
}
}
}
......
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