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 103532 Details for
Bug 235370
Add performance test for bug 234718
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed performance test
235370.txt (text/plain), 3.96 KB, created by
Jerome Lanneluc
on 2008-06-04 06:56:43 EDT
(
hide
)
Description:
Proposed performance test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2008-06-04 06:56:43 EDT
Size:
3.96 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.39 >diff -u -r1.39 FullSourceWorkspaceModelTests.java >--- src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceModelTests.java 28 May 2008 00:00:21 -0000 1.39 >+++ src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceModelTests.java 4 Jun 2008 10:56:09 -0000 >@@ -24,6 +24,7 @@ > import org.eclipse.core.resources.IResource; > import org.eclipse.core.resources.IWorkspace; > import org.eclipse.core.resources.IWorkspaceRoot; >+import org.eclipse.core.resources.IWorkspaceRunnable; > import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.*; > import org.eclipse.jdt.core.*; >@@ -760,6 +761,90 @@ > } > } > >+/* >+ * Ensures that the performance of reconcile after creating a package fragment in a batch operation is acceptable >+ * (regression test for bug 234718 JarPackageFragmentRoot.computeChildren(..) is slow ) >+ */ >+public void testPerfBatchCreatePackageAndReconcile() throws CoreException { >+ tagAsSummary("Reconcile editor change after creating a package fragment in a batch operation", false); // do NOT put in fingerprint >+ >+ IJavaProject project = null; >+ try { >+ project = createJavaProject("P234718"); >+ IFile bigJar1 = BIG_PROJECT.getProject().getFile(BIG_JAR1_NAME); >+ IFile bigJar2 = BIG_PROJECT.getProject().getFile(BIG_JAR2_NAME); >+ project.setRawClasspath( >+ new IClasspathEntry[] { >+ JavaCore.newSourceEntry(project.getPath()), >+ JavaCore.newLibraryEntry(bigJar1.getFullPath(), null, null), >+ JavaCore.newLibraryEntry(bigJar2.getFullPath(), null, null), >+ }, null); >+ final IPackageFragmentRoot root = project.getPackageFragmentRoot(project.getProject()); >+ ICompilationUnit workingCopy = root.getPackageFragment("").createCompilationUnit( >+ "X.java", >+ "public class {\n" + >+ "}" >+ , false, null); >+ workingCopy.becomeWorkingCopy(null); >+ AbstractJavaModelTests.waitUntilIndexesReady(); >+ AbstractJavaModelTests.waitForAutoBuild(); >+ >+ // Warm up >+ try { >+ final ICompilationUnit copy = workingCopy; >+ IWorkspaceRunnable runnable = new IWorkspaceRunnable(){ >+ public void run(IProgressMonitor monitor) throws CoreException { >+ root.createPackageFragment("p2", false/*don't force*/, monitor); >+ copy.reconcile(AST.JLS3, true, null, monitor); >+ int warmup = WARMUP_COUNT / 5; >+ for (int i=0; i<warmup; i++) { >+ copy.reconcile(AST.JLS3, true, null, monitor); >+ } >+ } >+ }; >+ try { >+ JavaCore.run(runnable, null); >+ } finally { >+ root.getPackageFragment("p2").delete(false/*don't force*/, null); >+ } >+ >+ // Measures >+ resetCounters(); >+ runnable = new IWorkspaceRunnable(){ >+ public void run(IProgressMonitor monitor) throws CoreException { >+ root.createPackageFragment("p2", false/*don't force*/, monitor); >+ copy.reconcile(AST.JLS3, true, null, monitor); >+ int iterations = 10; >+ startMeasuring(); >+ for (int n=0; n<iterations; n++) { >+ copy.reconcile(AST.JLS3, true, null, monitor); >+ } >+ stopMeasuring(); >+ } >+ }; >+ for (int i=0; i<MEASURES_COUNT; i++) { >+ runGc(); >+ try { >+ JavaCore.run(runnable, null); >+ } finally { >+ root.getPackageFragment("p2").delete(false/*don't force*/, null); >+ } >+ } >+ } >+ finally { >+ workingCopy.discardWorkingCopy(); >+ } >+ >+ // Commit >+ commitMeasurements(); >+ assertPerformance(); >+ >+ } finally { >+ if (project != null) >+ project.getProject().delete(true, null); >+ } >+} >+ > /** > * Ensures that the reconciler does nothing when the source > * to reconcile with is the same as the current contents.
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 235370
: 103532