Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 96728 Details for
Bug 116487
create performance test harness
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
GoToUnreadTaskAction Performance Test
clipboard.txt (text/plain), 3.70 KB, created by
Jingwen 'Owen' Ou
on 2008-04-19 22:42:12 EDT
(
hide
)
Description:
GoToUnreadTaskAction Performance Test
Filename:
MIME Type:
Creator:
Jingwen 'Owen' Ou
Created:
2008-04-19 22:42:12 EDT
Size:
3.70 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.tests >Index: src/org/eclipse/mylyn/tasks/tests/performance/TaskListViewPerformanceTest.java >=================================================================== >RCS file: src/org/eclipse/mylyn/tasks/tests/performance/TaskListViewPerformanceTest.java >diff -N src/org/eclipse/mylyn/tasks/tests/performance/TaskListViewPerformanceTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/tasks/tests/performance/TaskListViewPerformanceTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,96 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2007 Mylyn project committers 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 >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.tasks.tests.performance; >+ >+import java.io.File; >+ >+import org.eclipse.mylyn.internal.tasks.ui.actions.GoToUnreadTaskAction; >+import org.eclipse.mylyn.internal.tasks.ui.util.TaskListWriter; >+import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; >+import org.eclipse.mylyn.internal.tasks.ui.views.TaskListViewCommands; >+import org.eclipse.mylyn.tasks.core.TaskList; >+import org.eclipse.mylyn.tasks.tests.TaskTestUtil; >+import org.eclipse.mylyn.tasks.ui.TaskListManager; >+import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; >+import org.eclipse.test.performance.PerformanceTestCase; >+import org.eclipse.ui.PlatformUI; >+ >+/** >+ * @author Jingwen Ou >+ */ >+ >+public class TaskListViewPerformanceTest extends PerformanceTestCase { >+ >+ private TaskListView taskListView; >+ >+ private static final String TASK_LIST_4000 = "testdata/performance/tasklist-4000.xml.zip"; >+ >+ private TaskListManager taskListManager; >+ >+ private TaskList taskList; >+ >+ @Override >+ protected void setUp() throws Exception { >+ super.setUp(); >+ taskListView = (TaskListView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView( >+ TaskListView.ID); >+ >+ taskListManager = TasksUiPlugin.getTaskListManager(); >+ taskList = taskListManager.getTaskList(); >+ taskList.reset(); >+ >+ } >+ >+ @Override >+ protected void tearDown() throws Exception { >+ super.tearDown(); >+ taskListView.dispose(); >+ taskList.reset(); >+ } >+ >+ public void testActivateHandlers() { >+ >+ TaskListViewCommands taskListViewCommands = new TaskListViewCommands(taskListView); >+ >+ for (int i = 0; i < 10; i++) { >+ startMeasuring(); >+ taskListViewCommands.activateHandlers(); >+ stopMeasuring(); >+ } >+ >+ commitMeasurements(); >+ assertPerformance(); >+ >+ taskListViewCommands.dispose(); >+ } >+ >+ //the task list sample is not typical enough, the incoming task is at the top of the tree(the 2nd one...) >+ //so the tree walker can easily find this unread task, if the unread task is at the bottom... >+ //suggest doing some tuning :) >+ public void testGoToUnreadTaskAction() { >+ //fill the view with task list >+ final File file = TaskTestUtil.getLocalFile(TASK_LIST_4000); >+ final TaskListWriter taskListWriter = taskListManager.getTaskListWriter(); >+ taskListWriter.readTaskList(taskList, file, TasksUiPlugin.getTaskDataManager()); >+ taskListView.refresh(); >+ >+ GoToUnreadTaskAction action = new GoToUnreadTaskAction(); >+ action.init(taskListView); >+ >+ for (int i = 0; i < 10; i++) { >+ startMeasuring(); >+ action.run(); >+ stopMeasuring(); >+ } >+ >+ commitMeasurements(); >+ assertPerformance(); >+ >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 116487
:
83034
|
83035
|
92635
|
92636
|
92637
|
92638
|
92639
|
92640
|
92641
|
92642
|
92643
|
92644
|
95149
|
95791
|
95792
|
96692
| 96728 |
97960
|
146251