Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 301438 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java (+30 lines)
Lines 151-155 Link Here
151
		assertPerformance();
151
		assertPerformance();
152
152
153
	}
153
	}
154
	
155
	// Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=301438
156
	public void testPerSuperTypes() throws CoreException {
157
		tagAsSummary("Type hierarchy", true); // put in fingerprint
158
		ICompilationUnit unit = getCompilationUnit("org.eclipse.jdt.core", "org.eclipse.jdt.internal.compiler.parser", "Parser.java");
159
		assertNotNull("Parser not found!", unit);
160
161
		// Warm up
162
		for (int i=0; i<WARMUP_COUNT; i++) {
163
			IType[] types = unit.getType("Parser").newSupertypeHierarchy(null).getAllClasses();
164
			if (i==0) {
165
				System.out.println("  - "+INT_FORMAT.format(types.length)+" all classes found in hierarchy.");
166
			}
167
		}
168
169
		// Clean memory
170
		runGc();
171
172
		// Measures
173
		for (int i=0; i<MEASURES_COUNT; i++) {
174
			runGc();
175
			startMeasuring();
176
			unit.getType("Parser").newSupertypeHierarchy(null).getAllClasses();
177
			stopMeasuring();
178
		}
179
180
		// Commit
181
		commitMeasurements();
182
		assertPerformance();
183
	}
154
184
155
}
185
}

Return to bug 301438