diff options
author | spingel | 2009-09-23 03:45:46 +0000 |
---|---|---|
committer | spingel | 2009-09-23 03:45:46 +0000 |
commit | 09c4288b589847327af47b9e0e67806f987ab5fc (patch) | |
tree | b133443f43d294dce011dc2490d52b8635136a98 /org.eclipse.mylyn.tasks.tests | |
parent | 85ad3ca28b0c9a32387b60da9fa50007ecdca36a (diff) | |
download | org.eclipse.mylyn.tasks-09c4288b589847327af47b9e0e67806f987ab5fc.tar.gz org.eclipse.mylyn.tasks-09c4288b589847327af47b9e0e67806f987ab5fc.tar.xz org.eclipse.mylyn.tasks-09c4288b589847327af47b9e0e67806f987ab5fc.zip |
NEW - bug 116487: create performance test harness
https://bugs.eclipse.org/bugs/show_bug.cgi?id=116487
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests')
4 files changed, 0 insertions, 154 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF index 554f036c1..ca57647de 100644 --- a/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF @@ -24,7 +24,6 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.mylyn.commons.net, org.eclipse.mylyn.commons.ui, org.eclipse.jface.text, - org.eclipse.test.performance, org.eclipse.ui.ide, org.eclipse.mylyn.tasks.bugs, org.eclipse.mylyn.commons.core, @@ -38,7 +37,6 @@ Export-Package: org.eclipse.mylyn.tasks.tests;x-internal:=true, org.eclipse.mylyn.tasks.tests.connector;x-internal:=true, org.eclipse.mylyn.tasks.tests.core;x-internal:=true, org.eclipse.mylyn.tasks.tests.data;x-internal:=true, - org.eclipse.mylyn.tasks.tests.performance;x-internal:=true, org.eclipse.mylyn.tasks.tests.ui;x-internal:=true, org.eclipse.mylyn.tasks.tests.ui.editor;x-internal:=true, org.eclipse.mylyn.tasks.tests.util;x-internal:=true diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksPerformanceTests.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksPerformanceTests.java deleted file mode 100644 index a9d1ccffe..000000000 --- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksPerformanceTests.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2008 Tasktop Technologies and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Tasktop Technologies - initial API and implementation - *******************************************************************************/ - -package org.eclipse.mylyn.tasks.tests; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.eclipse.mylyn.tasks.tests.performance.TaskContainerTest; -import org.eclipse.mylyn.tasks.tests.performance.TaskListPerformanceTest; - -public class AllTasksPerformanceTests { - - public static Test suite() { - TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.tests.performance"); - suite.addTestSuite(TaskContainerTest.class); - suite.addTestSuite(TaskListPerformanceTest.class); - return suite; - } - -}
\ No newline at end of file diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskContainerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskContainerTest.java deleted file mode 100644 index 9f9826113..000000000 --- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskContainerTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2008 Tasktop Technologies and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Tasktop Technologies - initial API and implementation - *******************************************************************************/ - -package org.eclipse.mylyn.tasks.tests.performance; - -import org.eclipse.mylyn.internal.tasks.core.AbstractTask; -import org.eclipse.mylyn.tasks.tests.connector.MockTask; -import org.eclipse.test.performance.PerformanceTestCase; - -/** - * @author Steffen Pingel - */ -public class TaskContainerTest extends PerformanceTestCase { - - int counter; - - private void addChildren(AbstractTask parent, int[] childCount, int depth) { - for (int i = 0; i < childCount[depth]; i++) { - MockTask task = new MockTask("task", ++counter + ""); - parent.internalAddChild(task); - if (depth < childCount.length - 1) { - addChildren(task, childCount, depth + 1); - } - } - } - - public void testContains() { - MockTask task = new MockTask(++counter + ""); - addChildren(task, new int[] { 1000, 10, 2 }, 0); - - for (int i = 0; i < 10; i++) { - startMeasuring(); - task.contains("handle"); - stopMeasuring(); - } - - commitMeasurements(); - assertPerformance(); - } - -} diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskListPerformanceTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskListPerformanceTest.java deleted file mode 100644 index 744a98e36..000000000 --- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskListPerformanceTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2009 Tasktop Technologies and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Tasktop Technologies - initial API and implementation - *******************************************************************************/ - -package org.eclipse.mylyn.tasks.tests.performance; - -import java.io.File; - -import org.eclipse.mylyn.internal.tasks.core.TaskList; -import org.eclipse.mylyn.internal.tasks.core.TransferList; -import org.eclipse.mylyn.internal.tasks.core.externalization.TaskListExternalizer; -import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; -import org.eclipse.mylyn.tasks.tests.TaskTestUtil; -import org.eclipse.test.performance.PerformanceTestCase; - -public class TaskListPerformanceTest extends PerformanceTestCase { - - private static final String TASK_LIST_4000 = "testdata/performance/tasklist-4000.xml.zip"; - - private TaskList taskList; - - @Override - protected void setUp() throws Exception { - super.setUp(); - - taskList = TasksUiPlugin.getTaskList(); - taskList.reset(); - } - - @Override - protected void tearDown() throws Exception { - super.tearDown(); - - taskList.reset(); - } - - public void testReadTasksWith4000Tasks() throws Exception { - final File file = TaskTestUtil.getLocalFile(TASK_LIST_4000); - final TaskListExternalizer taskListWriter = TasksUiPlugin.getDefault().createTaskListExternalizer(); - - for (int i = 0; i < 10; i++) { - startMeasuring(); - taskListWriter.readTaskList(new TransferList(), file); - stopMeasuring(); - taskList.reset(); - } - - commitMeasurements(); - assertPerformance(); - } - - public void testReadTaskListWith4000Tasks() throws Exception { - final File file = TaskTestUtil.getLocalFile(TASK_LIST_4000); - final TaskListExternalizer taskListWriter = TasksUiPlugin.getDefault().createTaskListExternalizer(); - - for (int i = 0; i < 10; i++) { - startMeasuring(); - taskListWriter.readTaskList(new TransferList(), file); - stopMeasuring(); - taskList.reset(); - } - - commitMeasurements(); - assertPerformance(); - } - -} |