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 184329 Details for
Bug 331632
FUP of 323514: Add performance tracking test for scenario
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed draft patch
v00.txt (text/plain), 5.85 KB, created by
Frederic Fusier
on 2010-12-02 04:20:36 EST
(
hide
)
Description:
Proposed draft patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2010-12-02 04:20:36 EST
Size:
5.85 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.performance >Index: src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceModelTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceModelTests.java,v >retrieving revision 1.48 >diff -u -r1.48 FullSourceWorkspaceModelTests.java >--- src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceModelTests.java 27 Oct 2009 13:05:53 -0000 1.48 >+++ src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceModelTests.java 2 Dec 2010 09:09:33 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation 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 >@@ -89,12 +89,13 @@ > } > > static { >-// TESTS_NAMES = new String[] { >+ TESTS_NAMES = new String[] { > // "testPerfNameLookupFindKnownSecondaryType", > // "testPerfNameLookupFindUnknownType", > // "testPerfReconcile", > // "testPerfSearchAllTypeNamesAndReconcile", >-// }; >+ "testOpenProjects", >+ }; > > // TESTS_PREFIX = "testPerfReconcile"; > } >@@ -129,6 +130,7 @@ > IProject bigProject = workspaceRoot.getProject(BIG_PROJECT_NAME); > if (bigProject.exists()) { > ENV.addProject(bigProject); >+ bigProject.open(null); > } else { > ENV.addProject(BIG_PROJECT_NAME); > } >@@ -246,10 +248,11 @@ > > // Print statistics > if (TESTS_COUNT == 0) { >- System.out.println("-------------------------------------"); >- System.out.println("Model performance test statistics:"); >+// System.out.println("-------------------------------------"); >+// System.out.println("Model performance test statistics:"); > // NumberFormat intFormat = NumberFormat.getIntegerInstance(); >- System.out.println("-------------------------------------\n"); >+// System.out.println("-------------------------------------\n"); >+// ResourcesPlugin.getWorkspace().save(true/*full save*/, null/*no progress*/); > } > super.tearDown(); > } >@@ -1283,6 +1286,94 @@ > } > } > >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=323514 >+public void testReopenSingleProject() throws CoreException { >+ tagAsSummary("Reopen a single project in a workspace", false); // do NOT put in fingerprint >+ >+ // First close all Eclipse projects >+ long startTime = 0; >+ if (PRINT) { >+ System.out.print("Close all Eclipse projects..."); >+ startTime = System.currentTimeMillis(); >+ } >+ int length=ALL_PROJECTS.length; >+ for (int j=0; j<length; j++) { >+ ALL_PROJECTS[j].getProject().close(null); >+ } >+ AbstractJavaModelTests.waitUntilIndexesReady(); >+ AbstractJavaModelTests.waitForAutoBuild(); >+ if (PRINT) { >+ System.out.println((System.currentTimeMillis()-startTime)+"ms"); >+ } >+ >+ >+ // Warm-up >+ if (PRINT) { >+ System.out.print("Warmup test..."); >+ startTime = System.currentTimeMillis(); >+ } >+ final int warmup = WARMUP_COUNT / 10; >+ for (int i=0; i<warmup; i++) { >+ BIG_PROJECT.getProject().close(null); >+ AbstractJavaModelTests.waitUntilIndexesReady(); >+ AbstractJavaModelTests.waitForAutoBuild(); >+ BIG_PROJECT.getProject().open(null); >+ AbstractJavaModelTests.waitUntilIndexesReady(); >+ AbstractJavaModelTests.waitForAutoBuild(); >+ AbstractJavaModelTests.waitForManualRefresh(); >+ } >+ if (PRINT) { >+ System.out.println((System.currentTimeMillis()-startTime)+"ms"); >+ } >+ >+ // Measures >+ if (PRINT) { >+ System.out.println(); >+ System.out.println("Start measures:"); >+ startTime = System.currentTimeMillis(); >+ } >+ for (int i=0; i<MEASURES_COUNT; i++) { >+ runGc(); >+ BIG_PROJECT.getProject().close(null); >+ AbstractJavaModelTests.waitUntilIndexesReady(); >+ AbstractJavaModelTests.waitForAutoBuild(); >+ startMeasuring(); >+ BIG_PROJECT.getProject().open(null); >+ AbstractJavaModelTests.waitUntilIndexesReady(); >+ AbstractJavaModelTests.waitForAutoBuild(); >+ AbstractJavaModelTests.waitForManualRefresh(); >+ stopMeasuring(); >+ } >+ if (PRINT) { >+ System.out.println(" total time: "+((System.currentTimeMillis()-startTime)/1000.0)+"s"); >+ } >+ >+ // Commit >+ if (PRINT) { >+ System.out.println(); >+ System.out.println("Commit measures:"); >+ startTime = System.currentTimeMillis(); >+ } >+ commitMeasurements(); >+ assertPerformance(); >+ >+ // Finally reopen all Eclipse projects >+ if (PRINT) { >+ System.out.print("Reopen Eclipse projects..."); >+ startTime = System.currentTimeMillis(); >+ } >+ for (int i=0; i<length; i++) { >+ ALL_PROJECTS[i].getProject().open(null); >+ } >+ AbstractJavaModelTests.waitUntilIndexesReady(); >+ AbstractJavaModelTests.waitForAutoBuild(); >+ AbstractJavaModelTests.waitForManualRefresh(); >+ runGc(); >+ if (PRINT) { >+ System.out.println((System.currentTimeMillis()-startTime)+"ms"); >+ } >+} >+ > protected void resetCounters() { > // do nothing > } >Index: src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java,v >retrieving revision 1.59 >diff -u -r1.59 FullSourceWorkspaceTests.java >--- src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java 21 Apr 2009 13:58:24 -0000 1.59 >+++ src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java 2 Dec 2010 09:09:33 -0000 >@@ -638,6 +638,7 @@ > IProject project = workspaceRoot.getProject(dirName); > if (project.exists()) { > ENV.addProject(project); >+ project.open(null); > } else { > ENV.addProject(dirName); > }
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 331632
:
184329
|
184344