View | Details | Raw Unified | Return to bug 329656
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java (-1 / +37 lines)
Lines 40-46 Link Here
40
	}
40
	}
41
41
42
	static {
42
	static {
43
//		TESTS_NAMES = new String[] { "testPerSuperTypes" };
43
		TESTS_NAMES = new String[] { "testTypeResolve" };
44
	}
44
	}
45
	public static Test suite() {
45
	public static Test suite() {
46
        Test suite = buildSuite(testClass());
46
        Test suite = buildSuite(testClass());
Lines 181-185 Link Here
181
		commitMeasurements();
181
		commitMeasurements();
182
		assertPerformance();
182
		assertPerformance();
183
	}
183
	}
184
	public void testTypeResolve() throws Exception {
185
		ICompilationUnit unit = getCompilationUnit("org.eclipse.jdt.core", "org.eclipse.jdt.internal.core", "JavaModelManager.java");
186
		assertNotNull("Unit not found!", unit);
187
		IType type = unit.getType("JavaModelManager");
188
		assertNotNull(type);
189
		String[][] typeName = type.resolveType("JavaCore");
190
		
191
		for(int i = 0; i < typeName.length; i++) {
192
			for (int j=0; j < typeName[0].length; j++) {
193
				System.out.println(typeName[i][j]);
194
			}
195
			System.out.println("\n");
196
		}
197
198
		// Warm up
199
		for (int i=0; i<10*WARMUP_COUNT; i++) { // More Warm up is required.
200
			type = unit.getType("JavaModelManager");
201
			typeName = type.resolveType("IJavaProject");
202
		}
184
203
204
		// Clean memory
205
		runGc();
206
		// Measures
207
		for (int i=0; i<MEASURES_COUNT; i++) {
208
			runGc();
209
			startMeasuring();
210
			for (int j =0; j < 20; j++) {
211
				type = unit.getType("JavaModelManager");
212
				typeName = type.resolveType("JavaCore");
213
			}
214
			stopMeasuring();
215
		}
216
		// Commit
217
		commitMeasurements();
218
		assertPerformance();
219
		
220
	}
185
}
221
}

Return to bug 329656