View | Details | Raw Unified | Return to bug 306172 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java (-7 / +7 lines)
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
		assertNotNull("Parser not found!", PARSER_WORKING_COPY);
158
		ICompilationUnit unit = getCompilationUnit("org.eclipse.jdt.core", "org.eclipse.jdt.internal.compiler.parser", "Parser.java");
159
		assertNotNull("Parser not found!", unit);
160
158
161
		// Warm up
159
		// Warm up
162
		for (int i=0; i<WARMUP_COUNT; i++) {
160
		for (int i=0; i<10*WARMUP_COUNT; i++) { // More Warm up is required.
163
			IType[] types = unit.getType("Parser").newSupertypeHierarchy(null).getAllClasses();
161
			IType[] types = PARSER_WORKING_COPY.getType("Parser").newSupertypeHierarchy(null).getAllClasses();
164
			if (i==0) {
162
			if (i==0) {
165
				System.out.println("  - "+INT_FORMAT.format(types.length)+" all classes found in hierarchy.");
163
				System.out.println("  - "+INT_FORMAT.format(types.length)+" classes found in hierarchy.");
166
			}
164
			}
167
		}
165
		}
168
166
Lines 173-179 Link Here
173
		for (int i=0; i<MEASURES_COUNT; i++) {
171
		for (int i=0; i<MEASURES_COUNT; i++) {
174
			runGc();
172
			runGc();
175
			startMeasuring();
173
			startMeasuring();
176
			unit.getType("Parser").newSupertypeHierarchy(null).getAllClasses();
174
			for (int j =0; j < 20; j++) {
175
				PARSER_WORKING_COPY.getType("Parser").newSupertypeHierarchy(null).getAllClasses();
176
			}
177
			stopMeasuring();
177
			stopMeasuring();
178
		}
178
		}
179
179

Return to bug 306172