Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis D'Entremont2006-12-14 00:02:21 +0000
committerCurtis D'Entremont2006-12-14 00:02:21 +0000
commit19e5588a8f145b7fe15fe79ead1aff6f5df31d6d (patch)
tree2204d08ec10b3f2d432346f1022c838bd1e39b07 /org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests
parent20f0b14cfdefb822f1f0a58f6c616996f6b3cab2 (diff)
downloadeclipse.platform.ua-19e5588a8f145b7fe15fe79ead1aff6f5df31d6d.tar.gz
eclipse.platform.ua-19e5588a8f145b7fe15fe79ead1aff6f5df31d6d.tar.xz
eclipse.platform.ua-19e5588a8f145b7fe15fe79ead1aff6f5df31d6d.zip
improve performance tests
Diffstat (limited to 'org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests')
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/AllCheatSheetPerformanceTests.java (renamed from org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/performance/AllCheatSheetPerformanceTests.java)4
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/performance/OpenCheatSheetTest.java43
2 files changed, 38 insertions, 9 deletions
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/performance/AllCheatSheetPerformanceTests.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/AllCheatSheetPerformanceTests.java
index 015139857..f26bec0aa 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/performance/AllCheatSheetPerformanceTests.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/AllCheatSheetPerformanceTests.java
@@ -8,7 +8,9 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.ua.tests.cheatsheet.performance;
+package org.eclipse.ua.tests.cheatsheet;
+
+import org.eclipse.ua.tests.cheatsheet.performance.OpenCheatSheetTest;
import junit.framework.Test;
import junit.framework.TestSuite;
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/performance/OpenCheatSheetTest.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/performance/OpenCheatSheetTest.java
index 0cfe0d9a0..7ee920538 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/performance/OpenCheatSheetTest.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/performance/OpenCheatSheetTest.java
@@ -37,33 +37,60 @@ public class OpenCheatSheetTest extends PerformanceTestCase {
OpenIntroTest.closeIntro();
}
- public void testOpenCheatSheet() throws Exception {
- tagAsSummary("Open cheat sheet", Dimension.ELAPSED_PROCESS);
+ public void testOpenSimpleCheatSheet() throws Exception {
+ tagAsSummary("Open simple cheat sheet", Dimension.ELAPSED_PROCESS);
// warm-up
for (int i=0;i<3;++i) {
closeCheatSheet();
- openCheatSheet();
+ openSimpleCheatSheet();
}
// run the tests
for (int i=0;i<50;++i) {
closeCheatSheet();
startMeasuring();
- openCheatSheet();
+ openSimpleCheatSheet();
stopMeasuring();
}
commitMeasurements();
assertPerformance();
}
-
- private void openCheatSheet() throws Exception {
- OpenCheatSheetAction action = new OpenCheatSheetAction("org.eclipse.ua.tests.cheatsheet.performance");
+
+ public void testOpenCompositeCheatSheet() throws Exception {
+ tagAsSummary("Open composite cheat sheet", Dimension.ELAPSED_PROCESS);
+
+ // warm-up
+ for (int i=0;i<3;++i) {
+ closeCheatSheet();
+ openCompositeCheatSheet();
+ }
+
+ // run the tests
+ for (int i=0;i<50;++i) {
+ closeCheatSheet();
+ startMeasuring();
+ openCompositeCheatSheet();
+ stopMeasuring();
+ }
+
+ commitMeasurements();
+ assertPerformance();
+ }
+
+ private void openSimpleCheatSheet() throws Exception {
+ OpenCheatSheetAction action = new OpenCheatSheetAction("org.eclipse.ua.tests.cheatsheet.performance.simple");
action.run();
flush();
}
-
+
+ private void openCompositeCheatSheet() throws Exception {
+ OpenCheatSheetAction action = new OpenCheatSheetAction("org.eclipse.ua.tests.cheatsheet.performance.composite");
+ action.run();
+ flush();
+ }
+
private void closeCheatSheet() throws Exception {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IViewPart view = page.findView(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);

Back to the top