int warmUpRuns= getWarmUpRuns(); int measuredRuns= getMeasuredRuns();
	protected void measureScrolling(String file, ScrollingMode mode, boolean preload) throws Exception {		int warmUpRuns= getWarmUpRuns();		int measuredRuns= getMeasuredRuns();		IEditorPart editor= null;		try {			editor= EditorTestHelper.openInEditor(ResourceTestHelper.findFile(file), true);			EditorTestHelper.joinJobs(3000, 10000, 100);						setUp(editor);						Display display= EditorTestHelper.getActiveDisplay();						StyledText text= (StyledText) editor.getAdapter(Control.class);			int numberOfLines= text.getLineCount();			int visibleLinesInViewport= text.getClientArea().height / text.getLineHeight();			int operations= mode.computeOperations(numberOfLines, visibleLinesInViewport);						for (int i= 0; i < warmUpRuns + measuredRuns; i++) {				if (preload) {					for (int j= 0; j < operations; j++) {						// avoid overhead: assertTrue(text.getTopIndex() + visibleLinesInViewport < numberOfLines - 1);						SWTEventHelper.pressKeyCodeCombination(display, mode.SCROLL_COMBO, false);					}					if (i >= warmUpRuns)						fPerformanceMeter.start();					EditorTestHelper.runEventQueue(100);					if (i >= warmUpRuns)						fPerformanceMeter.stop();				} else {					if (i >= warmUpRuns)						fPerformanceMeter.start();					for (int j= 0; j < operations; j++) {						// avoid overhead: assertTrue(text.getTopIndex() + visibleLinesInViewport < numberOfLines - 1);						SWTEventHelper.pressKeyCodeCombination(display, mode.SCROLL_COMBO);					}					if (i >= warmUpRuns)						fPerformanceMeter.stop();					EditorTestHelper.runEventQueue(100);				}				assertTrue("TopIndex: "+text.getTopIndex() + " visibleLines: " + visibleLinesInViewport + " totalLines: " + numberOfLines + " operations: " + operations, text.getTopIndex() + visibleLinesInViewport >= numberOfLines - 1);				SWTEventHelper.pressKeyCodeCombination(display, mode.HOME_COMBO);				EditorTestHelper.runEventQueue(100);				assertEquals(0, text.getTopIndex());			}			fPerformanceMeter.commit();			Performance.getDefault().assertPerformance(fPerformanceMeter);		} finally {			tearDown(editor);			EditorTestHelper.closeAllEditors();		}	}