summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest')
-rw-r--r--sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java47
1 files changed, 46 insertions, 1 deletions
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 329eea6a3d..d05ed1fd74 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
@@ -78,6 +78,33 @@ public class PerformanceTestCase {
resultsFile.flush();
resultsFile.close();
}
+
+ @Test
+ public void testNodeStartStop() {
+ dumpHeapStart("testInstallUninstall");
+
+ printRuntimeStats("createRuntime");
+
+ createRuntime();
+
+ callNodeStartStopRepeatedly(100);
+
+ waitForInput();
+
+ dumpHeapEnd("testInstallUninstall_postNodeStop");
+
+ printRuntimeStats("stopRuntime");
+
+ stopRuntime();
+
+ printRuntimeStats("destroyRuntime");
+
+ destroyRuntime();
+
+ printRuntimeStats("End");
+
+ dumpHeapEnd("testInstallUninstall_postStop");
+ }
@Test
public void testInstallUninstall() {
@@ -91,7 +118,7 @@ public class PerformanceTestCase {
createNode();
- callInstallUninstallRepeatedly(10);
+ callInstallUninstallRepeatedly(100);
dumpHeapEnd("testInstallUninstall_postUninstall");
@@ -187,6 +214,24 @@ public class PerformanceTestCase {
// ============================================================
+ public void callNodeStartStopRepeatedly(int repeatCount) {
+ for (int i =0; i < repeatCount; i++){
+ printRuntimeStats("createNode");
+
+ createNode();
+
+ callInstallUninstallRepeatedly(1);
+
+ printRuntimeStats("stopNode");
+
+ stopNode();
+
+ printRuntimeStats("destroyNode");
+
+ destroyNode();
+ }
+ }
+
public void callInstallUninstallRepeatedly(int repeatCount) {
for (int i =0; i < repeatCount; i++){
printRuntimeStats("install/unistall contribution");