void (String message, int expectedMs) { EditorImpl editor = (EditorImpl)getEditor(); int editorHeight = editor.getPreferredHeight(); int[] result = {0}; PlatformTestUtil.startPerformanceTest(message, expectedMs, () -> { for (int y = 0; y < editorHeight; y += 1000) { Rectangle clip = new Rectangle(0, y, EDITOR_WIDTH_PX, 1000); NullGraphics2D g = new NullGraphics2D(clip); editor.getContentComponent().paintComponent(g); result[0] += g.getResult(); } }).assertTiming(); LOG.debug(String.valueOf(result[0])); }