From 1e997aee954eb8d197d36a2d8d4c61f95e31a155 Mon Sep 17 00:00:00 2001 From: Nils Christian Ehmke <nie@informatik.uni-kiel.de> Date: Tue, 9 Dec 2014 15:25:11 +0100 Subject: [PATCH] Solved a performance issue; provided some exemplaric monitoring logs --- .gitignore | 1 + .../kieker-20141008-101258830-UTC-000-Thread-1.dat | 0 {testdata => example monitoring logs}/kieker.map | 0 .../java/kieker/gui/model/domain/ExecutionEntry.java | 11 ++++------- .../gui/model/importer/filter/TraceReconstructor.java | 1 + src/main/java/kieker/gui/view/MainWindow.java | 1 - 6 files changed, 6 insertions(+), 8 deletions(-) rename {testdata => example monitoring logs}/kieker-20141008-101258830-UTC-000-Thread-1.dat (100%) rename {testdata => example monitoring logs}/kieker.map (100%) diff --git a/.gitignore b/.gitignore index 929d53bf..07766150 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /.project /.settings/org.eclipse.jdt.core.prefs /bin/ +/build diff --git a/testdata/kieker-20141008-101258830-UTC-000-Thread-1.dat b/example monitoring logs/kieker-20141008-101258830-UTC-000-Thread-1.dat similarity index 100% rename from testdata/kieker-20141008-101258830-UTC-000-Thread-1.dat rename to example monitoring logs/kieker-20141008-101258830-UTC-000-Thread-1.dat diff --git a/testdata/kieker.map b/example monitoring logs/kieker.map similarity index 100% rename from testdata/kieker.map rename to example monitoring logs/kieker.map diff --git a/src/main/java/kieker/gui/model/domain/ExecutionEntry.java b/src/main/java/kieker/gui/model/domain/ExecutionEntry.java index e3fb7e1e..ff5de283 100644 --- a/src/main/java/kieker/gui/model/domain/ExecutionEntry.java +++ b/src/main/java/kieker/gui/model/domain/ExecutionEntry.java @@ -67,8 +67,6 @@ public final class ExecutionEntry { public void setDuration(final long duration) { this.duration = duration; - - this.updatePercent(); } public boolean isFailed() { @@ -106,23 +104,22 @@ public final class ExecutionEntry { public void addExecutionEntry(final ExecutionEntry entry) { this.children.add(entry); entry.parent = this; - - this.updatePercent(); } public ExecutionEntry getParent() { return this.parent; } + public void recalculateValues() { + this.updatePercent(); + } + private void updatePercent() { if (this.parent != null) { this.percent = (this.duration * 100.0f) / this.parent.duration; } else { this.percent = 100.0f; } - for (final ExecutionEntry child : this.children) { - child.updatePercent(); - } } @Override diff --git a/src/main/java/kieker/gui/model/importer/filter/TraceReconstructor.java b/src/main/java/kieker/gui/model/importer/filter/TraceReconstructor.java index c7058aaf..815b79fb 100644 --- a/src/main/java/kieker/gui/model/importer/filter/TraceReconstructor.java +++ b/src/main/java/kieker/gui/model/importer/filter/TraceReconstructor.java @@ -117,6 +117,7 @@ public final class TraceReconstructor extends AbstractConsumerStage<IFlowRecord> } public ExecutionEntry reconstructTrace() { + this.root.recalculateValues(); return this.root; } diff --git a/src/main/java/kieker/gui/view/MainWindow.java b/src/main/java/kieker/gui/view/MainWindow.java index 87206fca..a092d254 100644 --- a/src/main/java/kieker/gui/view/MainWindow.java +++ b/src/main/java/kieker/gui/view/MainWindow.java @@ -120,7 +120,6 @@ public final class MainWindow { final Display display = Display.getDefault(); this.createContents(); this.addLogic(); - DataSource.getInstance().loadMonitoringLogFromFS("testdata"); this.shell.open(); this.shell.layout(); while (!this.shell.isDisposed()) { -- GitLab