Lines 154-168
Link Here
|
154 |
|
154 |
|
155 |
// Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=301438 |
155 |
// Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=301438 |
156 |
public void testPerSuperTypes() throws CoreException { |
156 |
public void testPerSuperTypes() throws CoreException { |
157 |
tagAsSummary("Type hierarchy", true); // put in fingerprint |
157 |
tagAsSummary("Super type hierarchy", true); // put in fingerprint |
158 |
ICompilationUnit unit = getCompilationUnit("org.eclipse.jdt.core", "org.eclipse.jdt.internal.compiler.parser", "Parser.java"); |
158 |
assertNotNull("Parser not found!", PARSER_WORKING_COPY); |
159 |
assertNotNull("Parser not found!", unit); |
|
|
160 |
|
159 |
|
161 |
// Warm up |
160 |
// Warm up |
162 |
for (int i=0; i<WARMUP_COUNT; i++) { |
161 |
for (int i=0; i<10*WARMUP_COUNT; i++) { // More Warm up is required. |
163 |
IType[] types = unit.getType("Parser").newSupertypeHierarchy(null).getAllClasses(); |
162 |
IType[] types = PARSER_WORKING_COPY.getType("Parser").newSupertypeHierarchy(null).getAllClasses(); |
164 |
if (i==0) { |
163 |
if (i==0) { |
165 |
System.out.println(" - "+INT_FORMAT.format(types.length)+" all classes found in hierarchy."); |
164 |
System.out.println(" - "+INT_FORMAT.format(types.length)+" classes found in hierarchy."); |
166 |
} |
165 |
} |
167 |
} |
166 |
} |
168 |
|
167 |
|
Lines 173-179
Link Here
|
173 |
for (int i=0; i<MEASURES_COUNT; i++) { |
172 |
for (int i=0; i<MEASURES_COUNT; i++) { |
174 |
runGc(); |
173 |
runGc(); |
175 |
startMeasuring(); |
174 |
startMeasuring(); |
176 |
unit.getType("Parser").newSupertypeHierarchy(null).getAllClasses(); |
175 |
for (int j =0; j < 10; j++) { |
|
|
176 |
PARSER_WORKING_COPY.getType("Parser").newSupertypeHierarchy(null).getAllClasses(); |
177 |
} |
177 |
stopMeasuring(); |
178 |
stopMeasuring(); |
178 |
} |
179 |
} |
179 |
|
180 |
|