void () { int nCopies = 10000; String in = StringUtil.repeat("\na\nb\bc", nCopies); PlatformTestUtil.startPerformanceTest("print newlines with backspace", 5000, () -> { for (int i = 0; i < 2; i++) { myConsole.clear(); int printCount = ConsoleBuffer.getCycleBufferSize() / in.length(); for (int j = 0; j < printCount; j++) { myConsole.print(in, ConsoleViewContentType.NORMAL_OUTPUT); } PlatformTestUtil.dispatchAllInvocationEventsInIdeEventQueue(); myConsole.waitAllRequests(); assertEquals((long) printCount * nCopies * "\na\nc".length(), myConsole.getContentSize()); } }).assertTiming(); }