Skip to content
Snippets Groups Projects
Commit 8b2c00e6 authored by Sören Henning's avatar Sören Henning
Browse files

updated ComponentStatisticsDecoratorStage

parent 20a3e51a
No related branches found
No related tags found
1 merge request!19Trace aggr analysis
......@@ -2,8 +2,8 @@ package kieker.analysis.dev;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import kieker.analysis.domain.OperationCall;
import kieker.analysis.domain.systemdependency.Component;
import kieker.analysis.domain.systemdependency.Container;
import kieker.analysis.domain.systemdependency.Operation;
......@@ -20,14 +20,19 @@ public class ComponentStatisticsDecoratorStage extends AbstractTransformation<So
for (Container container : softwareSystem.getContainers()) {
for (Component component : container.getComponents()) {
// TODO How to handle Statistics?
// All durations of all OperationCalls
List<Long> durations = new ArrayList<>();
final List<Long> durations = new ArrayList<>();
for (Operation operation : component.getOperations()) {
List<Long> operationsDurations = operation.getOperationCalls().stream().map(c -> c.getDuration()).collect(Collectors.toList());
durations.addAll(operationsDurations);
for (OperationCall call : operation.getOperationCalls()) {
// Just handle calls from outside of this component
OperationCall caller = call.getParent();
if (caller == null || (caller.getComponent().equals(component.getName()) && caller.getContainer().equals(container.getName()))) {
durations.add(call.getDuration());
}
}
}
final Statistics statistics = StatisticsUtility.calculateStatistics(durations);
......
......@@ -13,6 +13,8 @@ import kieker.analysis.traceanalysisutil.StatisticsUtility;
import teetime.stage.basic.AbstractTransformation;
//TODO Not required
@Deprecated
public class ContainerStatisticsDecoratorStage extends AbstractTransformation<SoftwareSystem, SoftwareSystem> {
@Override
......
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