Skip to content
Snippets Groups Projects
Commit 1e997aee authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Solved a performance issue; provided some exemplaric monitoring logs

parent fa843ac7
No related branches found
No related tags found
No related merge requests found
...@@ -8,3 +8,4 @@ ...@@ -8,3 +8,4 @@
/.project /.project
/.settings/org.eclipse.jdt.core.prefs /.settings/org.eclipse.jdt.core.prefs
/bin/ /bin/
/build
File moved
...@@ -67,8 +67,6 @@ public final class ExecutionEntry { ...@@ -67,8 +67,6 @@ public final class ExecutionEntry {
public void setDuration(final long duration) { public void setDuration(final long duration) {
this.duration = duration; this.duration = duration;
this.updatePercent();
} }
public boolean isFailed() { public boolean isFailed() {
...@@ -106,23 +104,22 @@ public final class ExecutionEntry { ...@@ -106,23 +104,22 @@ public final class ExecutionEntry {
public void addExecutionEntry(final ExecutionEntry entry) { public void addExecutionEntry(final ExecutionEntry entry) {
this.children.add(entry); this.children.add(entry);
entry.parent = this; entry.parent = this;
this.updatePercent();
} }
public ExecutionEntry getParent() { public ExecutionEntry getParent() {
return this.parent; return this.parent;
} }
public void recalculateValues() {
this.updatePercent();
}
private void updatePercent() { private void updatePercent() {
if (this.parent != null) { if (this.parent != null) {
this.percent = (this.duration * 100.0f) / this.parent.duration; this.percent = (this.duration * 100.0f) / this.parent.duration;
} else { } else {
this.percent = 100.0f; this.percent = 100.0f;
} }
for (final ExecutionEntry child : this.children) {
child.updatePercent();
}
} }
@Override @Override
......
...@@ -117,6 +117,7 @@ public final class TraceReconstructor extends AbstractConsumerStage<IFlowRecord> ...@@ -117,6 +117,7 @@ public final class TraceReconstructor extends AbstractConsumerStage<IFlowRecord>
} }
public ExecutionEntry reconstructTrace() { public ExecutionEntry reconstructTrace() {
this.root.recalculateValues();
return this.root; return this.root;
} }
......
...@@ -120,7 +120,6 @@ public final class MainWindow { ...@@ -120,7 +120,6 @@ public final class MainWindow {
final Display display = Display.getDefault(); final Display display = Display.getDefault();
this.createContents(); this.createContents();
this.addLogic(); this.addLogic();
DataSource.getInstance().loadMonitoringLogFromFS("testdata");
this.shell.open(); this.shell.open();
this.shell.layout(); this.shell.layout();
while (!this.shell.isDisposed()) { while (!this.shell.isDisposed()) {
......
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