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 26842 Details for
Bug 108820
Index based type hierarchy should not consider interfaces in index when focus is a class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Performance test
patch108820_org.eclipse.jdt.core.tests.performance.txt (text/plain), 3.36 KB, created by
Jerome Lanneluc
on 2005-09-06 07:13:45 EDT
(
hide
)
Description:
Performance test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-09-06 07:13:45 EDT
Size:
3.36 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java,v >retrieving revision 1.4 >diff -u -r1.4 FullSourceWorkspaceTypeHierarchyTests.java >--- src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java 14 Apr 2005 18:24:48 -0000 1.4 >+++ src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java 6 Sep 2005 11:12:33 -0000 >@@ -29,8 +29,6 @@ > // Log files > private static PrintStream[] LOG_STREAMS = new PrintStream[LOG_TYPES.length]; > >- static int[] COUNTERS = new int[1]; >- > /** > * @param name > */ >@@ -38,9 +36,9 @@ > super(name); > } > >-// static { >-// TESTS_NAMES = new String[] { "testPerfAllTypes" }; >-// } >+ static { >+// TESTS_NAMES = new String[] { "testPerfClassWithPotentialSubinterfaces" }; >+ } > public static Test suite() { > Test suite = buildSuite(testClass()); > TESTS_COUNT = suite.countTestCases(); >@@ -72,16 +70,6 @@ > logPerfResult(LOG_STREAMS, TESTS_COUNT); > } > >- // Print statistics >- if (TESTS_COUNT == 0) { >- // Print statistics >- System.out.println("-------------------------------------"); >- System.out.println("Type Hierarchy test statistics:"); >- NumberFormat intFormat = NumberFormat.getIntegerInstance(); >- System.out.println(" - "+intFormat.format(COUNTERS[0])+" all types found."); >- System.out.println("-------------------------------------\n"); >- } >- > // Call super at the end as it close print streams > super.tearDown(); > } >@@ -121,7 +109,47 @@ > commitMeasurements(); > assertPerformance(); > >- // Store counter >- COUNTERS[0] = length; >+ // Print statistics >+ if (TESTS_COUNT == 0) { >+ // Print statistics >+ System.out.println("-------------------------------------"); >+ System.out.println("Type Hierarchy test statistics:"); >+ NumberFormat intFormat = NumberFormat.getIntegerInstance(); >+ System.out.println(" - "+intFormat.format(length)+" all types found."); >+ System.out.println("-------------------------------------\n"); >+ } >+ >+ } >+ >+ /* >+ * A direct subclass of org.eclipse.jface.text.templates.TemplateVariableResolver is called Collection. >+ * Collection is also an interface that is the root of a deep hierarchy in java.util. >+ * This test proves that the interface and all its potential subtypes are not injected while computing >+ * the hierarchy. >+ * (test for bug 108820 Index based type hierarchy should not consider interfaces in index when focus is a class) >+ */ >+ public void testPerfClassWithPotentialSubinterfaces() throws CoreException { >+ ICompilationUnit unit = getCompilationUnit("org.eclipse.text", "org.eclipse.jface.text.templates", "TemplateVariableResolver.java"); >+ assertNotNull("TemplateVariableResolver not found!", unit); >+ >+ // Warm up >+ IType type = unit.getType("TemplateVariableResolver"); >+ type.newTypeHierarchy(null); >+ >+ // Clean memory >+ runGc(); >+ >+ // Measures >+ for (int i=0; i<MEASURES_COUNT; i++) { >+ startMeasuring(); >+ type.newTypeHierarchy(null); >+ stopMeasuring(); >+ } >+ >+ // Commit >+ 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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 108820
:
26841
| 26842