From f1c7869ad106ac2035b57a5bf835841889b1b104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Henning?= <stu114708@informatik.uni-kiel.de> Date: Mon, 18 Jan 2016 18:42:49 +0100 Subject: [PATCH] fix some bugs --- .../analysis/dev/OperationsDependency.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/kieker/analysis/dev/OperationsDependency.java b/src/main/java/kieker/analysis/dev/OperationsDependency.java index b1ae7bcc..8bcc0f90 100644 --- a/src/main/java/kieker/analysis/dev/OperationsDependency.java +++ b/src/main/java/kieker/analysis/dev/OperationsDependency.java @@ -34,12 +34,18 @@ public class OperationsDependency { if (!operations.containsKey(key)) { operations.put(key, new AggregatedOperationCall(call.getContainer(), call.getComponent(), call.getOperation(), 0)); } - operations.get(key).addChild(call); + // TODO Dont't add the call as child but as something different + // operations.get(key).addChild(call); } private void addRelation(final AggregatedOperationCall call) { - String key = call.getIdentifier() + ',' + call.getIdentifier(); + if (call.getParent() == null) { + // TODO parent shouldn't be null. Create a class "EntryOperationCall". + return; + } + + String key = call.getIdentifier() + ',' + call.getParent().getIdentifier(); if (!relations.containsKey(key)) { @@ -51,9 +57,9 @@ public class OperationsDependency { } if (call.isFailed()) { - relations.get(key).addFailuredCalls(call.getCalls()); // TODO Temp + relations.get(key).addFailuredCalls(call.getCalls()); } else { - relations.get(key).addCalls(call.getCalls()); // TODO Temp + relations.get(key).addCalls(call.getCalls()); } } @@ -72,7 +78,7 @@ public class OperationsDependency { for (AggregatedOperationCall call2 : call.getValue().getChildren()) { - System.out.println(call2.getOperation()); + System.out.println(call2.getOperation() + ": " + call2.getCalls()); // System.out.println(call2.getFailedCause()); } @@ -91,7 +97,8 @@ public class OperationsDependency { System.out.println("Set begin"); // System.out.println(call.getKey()); - System.out.println(call.getValue().getCaller().getOperation() + "->" + call.getValue().getCallee().getOperation()); + System.out.println(call.getValue().getCaller().getOperation() + "<-" + call.getValue().getCallee().getOperation() + ": " + call.getValue().getCalls() + + " (F: " + call.getValue().getFailuredCalls() + ")"); System.out.println("Set end"); System.out.println(); } -- GitLab