From bce7b55e6627b6734192fddec8d0212cd1d1ce44 Mon Sep 17 00:00:00 2001 From: jennthom Date: Thu, 8 Mar 2012 18:59:27 +0000 Subject: Changes to add TUSCANY-3770 to 2.x stream and updates to performance testcase to produce an additional heap dump after uninstalling applications. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1298513 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/test/performance/PerformanceTestCase.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'sca-java-2.x/trunk/testing/itest') diff --git a/sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java b/sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java index bd6c349877..454ad9dad8 100644 --- a/sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java +++ b/sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java @@ -56,7 +56,7 @@ import com.sun.management.HotSpotDiagnosticMXBean; */ public class PerformanceTestCase { - public boolean writeHeapDump = false; + public boolean writeHeapDump = true; private static BufferedWriter resultsFile = null; @@ -81,7 +81,7 @@ public class PerformanceTestCase { @Test public void testInstallUninstall() { - dumpHeapStart(); + dumpHeapStart("testInstallUninstall"); printRuntimeStats("createRuntime"); @@ -92,6 +92,8 @@ public class PerformanceTestCase { createNode(); callInstallUninstallRepeatedly(10); + + dumpHeapEnd("testInstallUninstall_postUninstall"); checkCacheStatus(); @@ -113,13 +115,13 @@ public class PerformanceTestCase { printRuntimeStats("End"); - dumpHeapEnd(); + dumpHeapEnd("testInstallUninstall_postStop"); } @Test public void testCall() { - dumpHeapStart(); + dumpHeapStart("TestCall"); printRuntimeStats("createRuntime"); @@ -148,6 +150,7 @@ public class PerformanceTestCase { //printRuntimeStats("uninstallContribution"); //uninstallContribution(); + dumpHeapEnd("TestCall_postUninstall"); printRuntimeStats("stopNode"); @@ -167,7 +170,7 @@ public class PerformanceTestCase { printRuntimeStats("End"); - dumpHeapEnd(); + dumpHeapEnd("TestCall_postStop"); } public void checkCacheStatus(){ @@ -208,15 +211,15 @@ public class PerformanceTestCase { // ============================================================ - public void dumpHeapStart(){ + public void dumpHeapStart(String name){ if (writeHeapDump){ - dumpHeap("heap_start.bin"); + dumpHeap("heap_start_" + name + ".bin"); } } - public void dumpHeapEnd(){ + public void dumpHeapEnd(String name){ if (writeHeapDump){ - dumpHeap("heap_stop.bin"); + dumpHeap("heap_stop_" + name + ".bin"); System.out.println("You can watch a JVM run using \n" + " jconsole \n" + -- cgit v1.2.3