From 612d44e162eb36484fef89b71b5fa00f73d2268f Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 22 Nov 2018 16:15:12 +0300 Subject: [PATCH] remove spam from console --- .../RefreshOutputDirectoriesTest.java | 2 +- .../BytecodeAnalysisIntegrationTest.java | 1 - .../impl/FileTemplatesTest.groovy | 2 +- .../java/psi/JavaStubBuilderTest.java | 2 +- .../com/intellij/java/psi/MiscPsiTest.java | 6 +++--- .../java/psi/PsiConcurrencyStressTest.java | 2 +- .../psi/resolve/ResolvePerformanceTest.java | 14 +++++++------- .../java/refactoring/TypeCookTest.java | 2 +- .../SmartPsiElementPointersTest.java | 2 +- .../scopes/ScopeConfigurableTest.java | 2 +- .../refactoring/TypeMigrationTestBase.java | 2 +- .../application/impl/ApplicationImplTest.java | 2 +- .../editor/EditorPaintingTestCase.java | 2 +- .../openapi/editor/FoldingStressTest.java | 4 ++-- .../openapi/editor/impl/RangeMarkerTest.java | 2 +- .../openapi/fileTypes/impl/FileTypesTest.java | 10 +++++----- .../progress/impl/ProgressIndicatorTest.java | 2 +- .../util/lang/UrlClassLoaderTest.java | 2 +- .../SpellcheckerPerformanceTest.java | 19 ++++++++++--------- .../psi/formatter/XmlFormatterTest.java | 4 ++-- .../src/com/intellij/xml/XmlParsingTest.java | 14 +++++++------- 21 files changed, 49 insertions(+), 49 deletions(-) diff --git a/java/compiler/tests/com/intellij/compiler/RefreshOutputDirectoriesTest.java b/java/compiler/tests/com/intellij/compiler/RefreshOutputDirectoriesTest.java index 73877398c9e6..9d5bb2a5b2b4 100644 --- a/java/compiler/tests/com/intellij/compiler/RefreshOutputDirectoriesTest.java +++ b/java/compiler/tests/com/intellij/compiler/RefreshOutputDirectoriesTest.java @@ -81,6 +81,6 @@ public class RefreshOutputDirectoriesTest extends BaseCompilerTestCase { VirtualFile outputDir = LocalFileSystem.getInstance().findFileByIoFile(dir); assertNotNull("output directory wasn't refreshed: " + dir.getAbsolutePath(), outputDir); } - System.out.println("myRootsChangedCount = " + myRootsChangedCount); + LOG.debug("myRootsChangedCount = " + myRootsChangedCount); } } diff --git a/java/java-tests/testSrc/com/intellij/java/codeInspection/bytecodeAnalysis/BytecodeAnalysisIntegrationTest.java b/java/java-tests/testSrc/com/intellij/java/codeInspection/bytecodeAnalysis/BytecodeAnalysisIntegrationTest.java index ac10e1a7c113..9d50b2794be9 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInspection/bytecodeAnalysis/BytecodeAnalysisIntegrationTest.java +++ b/java/java-tests/testSrc/com/intellij/java/codeInspection/bytecodeAnalysis/BytecodeAnalysisIntegrationTest.java @@ -205,7 +205,6 @@ public class BytecodeAnalysisIntegrationTest extends LightCodeInsightFixtureTest assertEmpty(diffs); } - @SuppressWarnings("unused") public void _testExportInferredAnnotations() { PsiPackage rootPackage = JavaPsiFacade.getInstance(getProject()).findPackage(""); assertNotNull(rootPackage); diff --git a/java/java-tests/testSrc/com/intellij/java/ide/fileTemplates/impl/FileTemplatesTest.groovy b/java/java-tests/testSrc/com/intellij/java/ide/fileTemplates/impl/FileTemplatesTest.groovy index 23dd7d0b66b4..87969b8f9ad2 100644 --- a/java/java-tests/testSrc/com/intellij/java/ide/fileTemplates/impl/FileTemplatesTest.groovy +++ b/java/java-tests/testSrc/com/intellij/java/ide/fileTemplates/impl/FileTemplatesTest.groovy @@ -80,7 +80,7 @@ class FileTemplatesTest extends IdeaTestCase { properties.load(propFile, FileTemplate.ourEncoding) properties.put(FileTemplateManager.PROJECT_NAME_VARIABLE, getProject().getName()) - System.out.println(resultFile.getName()) + LOG.debug(resultFile.getName()) doTestTemplate(inputText, properties, outputText) } } diff --git a/java/java-tests/testSrc/com/intellij/java/psi/JavaStubBuilderTest.java b/java/java-tests/testSrc/com/intellij/java/psi/JavaStubBuilderTest.java index 4b593a2edbc3..e4ec38191e75 100644 --- a/java/java-tests/testSrc/com/intellij/java/psi/JavaStubBuilderTest.java +++ b/java/java-tests/testSrc/com/intellij/java/psi/JavaStubBuilderTest.java @@ -551,7 +551,7 @@ public class JavaStubBuilderTest extends LightIdeaTestCase { " FIELD:PsiFieldStub[BIG:BigInteger=;INITIALIZER_NOT_STORED;]\n" + " MODIFIER_LIST:PsiModifierListStub[mask=0]\n", DebugUtil.stubTreeToString(tree)); - System.out.println("SOE depth=" + i + ", time=" + t + "ms"); + LOG.debug("SOE depth=" + i + ", time=" + t + "ms"); } public void testPerformance() throws IOException { diff --git a/java/java-tests/testSrc/com/intellij/java/psi/MiscPsiTest.java b/java/java-tests/testSrc/com/intellij/java/psi/MiscPsiTest.java index af29adadce26..6d92e5cf91ba 100644 --- a/java/java-tests/testSrc/com/intellij/java/psi/MiscPsiTest.java +++ b/java/java-tests/testSrc/com/intellij/java/psi/MiscPsiTest.java @@ -81,9 +81,9 @@ public class MiscPsiTest extends LightCodeInsightFixtureTestCase { fileCopy = (PsiFile) fileCopy.setName("NewTest.xxx"); PsiFile newFile = (PsiFile)dir.add(fileCopy); if (!(newFile instanceof PsiBinaryFile)) { - System.out.println(newFile.getVirtualFile().getFileType()); - System.out.println(newFile.getFileType()); - System.out.println(newFile.getText()); + System.err.println(newFile.getVirtualFile().getFileType()); + System.err.println(newFile.getFileType()); + System.err.println(newFile.getText()); } assertInstanceOf(newFile, PsiBinaryFile.class); diff --git a/java/java-tests/testSrc/com/intellij/java/psi/PsiConcurrencyStressTest.java b/java/java-tests/testSrc/com/intellij/java/psi/PsiConcurrencyStressTest.java index 39ae7127b491..cf82691ef685 100644 --- a/java/java-tests/testSrc/com/intellij/java/psi/PsiConcurrencyStressTest.java +++ b/java/java-tests/testSrc/com/intellij/java/psi/PsiConcurrencyStressTest.java @@ -58,7 +58,7 @@ public class PsiConcurrencyStressTest extends DaemonAnalyzerTestCase { DaemonProgressIndicator.setDebug(false); int numOfThreads = Runtime.getRuntime().availableProcessors(); int iterations = Timings.adjustAccordingToMySpeed(20, true); - System.out.println("iterations = " + iterations); + LOG.debug("iterations = " + iterations); final int readIterations = iterations * 3; synchronized (this) { diff --git a/java/java-tests/testSrc/com/intellij/java/psi/resolve/ResolvePerformanceTest.java b/java/java-tests/testSrc/com/intellij/java/psi/resolve/ResolvePerformanceTest.java index bc0ed875fa83..dd9aa81426a0 100644 --- a/java/java-tests/testSrc/com/intellij/java/psi/resolve/ResolvePerformanceTest.java +++ b/java/java-tests/testSrc/com/intellij/java/psi/resolve/ResolvePerformanceTest.java @@ -48,25 +48,25 @@ public class ResolvePerformanceTest extends ResolveTestCase { visitElement(expression); } }); - System.out.println(); - System.out.println("Found " + references.size() + " references"); + LOG.debug(""); + LOG.debug("Found " + references.size() + " references"); long time = System.currentTimeMillis(); // Not cached pass resolveAllReferences(references); - System.out.println("Not cached resolve: " + (System.currentTimeMillis() - time)/(double)1000 + "s"); + LOG.debug("Not cached resolve: " + (System.currentTimeMillis() - time)/(double)1000 + "s"); ApplicationManager.getApplication().runWriteAction(() -> ResolveCache.getInstance(myProject).clearCache(true)); time = System.currentTimeMillis(); // Cached pass resolveAllReferences(references); - System.out.println("Not cached resolve with cached repository: " + (System.currentTimeMillis() - time)/(double)1000 + "s"); + LOG.debug("Not cached resolve with cached repository: " + (System.currentTimeMillis() - time)/(double)1000 + "s"); time = System.currentTimeMillis(); // Cached pass resolveAllReferences(references); - System.out.println("Cached resolve: " + (System.currentTimeMillis() - time)/(double)1000 + "s"); + LOG.debug("Cached resolve: " + (System.currentTimeMillis() - time)/(double)1000 + "s"); } public void testPerformance2() throws Exception{ @@ -92,8 +92,8 @@ public class ResolvePerformanceTest extends ResolveTestCase { } }); - System.out.println(); - System.out.println("Found " + references.size() + " references"); + LOG.debug(""); + LOG.debug("Found " + references.size() + " references"); resolveAllReferences(references); } diff --git a/java/java-tests/testSrc/com/intellij/java/refactoring/TypeCookTest.java b/java/java-tests/testSrc/com/intellij/java/refactoring/TypeCookTest.java index b8e8a312b4e7..59b825835dee 100644 --- a/java/java-tests/testSrc/com/intellij/java/refactoring/TypeCookTest.java +++ b/java/java-tests/testSrc/com/intellij/java/refactoring/TypeCookTest.java @@ -763,7 +763,7 @@ public class TypeCookTest extends MultiFileTestCase { writer.print(itemRepr); } - System.out.println("Pattern not found, file " + patternName + " created."); + System.err.println("Pattern not found, file " + patternName + " created."); LocalFileSystem.getInstance().refreshAndFindFileByIoFile(patternFile); } diff --git a/java/java-tests/testSrc/com/intellij/psi/impl/smartPointers/SmartPsiElementPointersTest.java b/java/java-tests/testSrc/com/intellij/psi/impl/smartPointers/SmartPsiElementPointersTest.java index 128297e3b1ce..cdcb71980f12 100644 --- a/java/java-tests/testSrc/com/intellij/psi/impl/smartPointers/SmartPsiElementPointersTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/impl/smartPointers/SmartPsiElementPointersTest.java @@ -514,7 +514,7 @@ public class SmartPsiElementPointersTest extends CodeInsightTestCase { //System.out.println("file = " + file); } else { - System.out.println("already loaded file = " + file); + LOG.debug("already loaded file = " + file); } } } diff --git a/java/java-tests/testSrc/com/intellij/scopes/ScopeConfigurableTest.java b/java/java-tests/testSrc/com/intellij/scopes/ScopeConfigurableTest.java index 75ea459f8b14..2009102cddb6 100644 --- a/java/java-tests/testSrc/com/intellij/scopes/ScopeConfigurableTest.java +++ b/java/java-tests/testSrc/com/intellij/scopes/ScopeConfigurableTest.java @@ -39,7 +39,7 @@ public class ScopeConfigurableTest extends CodeInsightTestCase { manager.addScope(utilscope); try { for (NamedScope scope : manager.getScopes()) { - System.out.println("scope = " + scope); + LOG.debug("scope = " + scope); ScopeConfigurable configurable = new ScopeConfigurable(scope, true, getProject(), null); configurable.reset(); assertFalse("Configurable " + configurable + " is modified immediately after creation", configurable.isModified()); diff --git a/java/typeMigration/test/com/intellij/refactoring/TypeMigrationTestBase.java b/java/typeMigration/test/com/intellij/refactoring/TypeMigrationTestBase.java index 49fe7c6b0ce2..ffd461193889 100644 --- a/java/typeMigration/test/com/intellij/refactoring/TypeMigrationTestBase.java +++ b/java/typeMigration/test/com/intellij/refactoring/TypeMigrationTestBase.java @@ -176,7 +176,7 @@ public abstract class TypeMigrationTestBase extends MultiFileTestCase { writer.print(report); } - System.out.println("Pattern not found, file " + patternName + " created."); + System.err.println("Pattern not found, file " + patternName + " created."); LocalFileSystem.getInstance().refreshAndFindFileByIoFile(patternFile); } diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/application/impl/ApplicationImplTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/application/impl/ApplicationImplTest.java index 18874f650ab6..009ae6eba963 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/application/impl/ApplicationImplTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/application/impl/ApplicationImplTest.java @@ -735,7 +735,7 @@ public class ApplicationImplTest extends LightPlatformTestCase { app.runReadAction(EmptyRunnable.getInstance()); assertFalse(writeCompleted.get()); if (exception != null) throw new RuntimeException(exception); - System.out.println(ThreadDumper.dumpThreadsToString()); + System.err.println(ThreadDumper.dumpThreadsToString()); fail("Must have been failed"); } catch (ApplicationUtil.CannotRunReadActionException ignored) { diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorPaintingTestCase.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorPaintingTestCase.java index 737171dc6870..94d88d70b0e7 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorPaintingTestCase.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorPaintingTestCase.java @@ -184,7 +184,7 @@ public abstract class EditorPaintingTestCase extends AbstractEditorTest { File fileWithExpectedResult = getTestDataFile(getTestDataPath(), expectedResultFileName); if (OVERWRITE_TESTDATA) { ImageIO.write(image, "png", fileWithExpectedResult); - System.out.println("File " + fileWithExpectedResult.getPath() + " created."); + System.err.println("File " + fileWithExpectedResult.getPath() + " created."); } if (fileWithExpectedResult.exists()) { BufferedImage expectedResult = ImageIO.read(fileWithExpectedResult); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/FoldingStressTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/FoldingStressTest.java index 1527f9f26b99..1b308f716bf9 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/FoldingStressTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/FoldingStressTest.java @@ -83,7 +83,7 @@ public class FoldingStressTest extends LightPlatformTestCase { } public void testRestoreManyFoldRegionsPerformance() { - System.out.println("In stress test: " + ApplicationInfoImpl.isInStressTest()); + LOG.debug("In stress test: " + ApplicationInfoImpl.isInStressTest()); int N = 100_000; DocumentImpl doc = new DocumentImpl(StringUtil.repeat("x", N)); Editor editor = EditorFactory.getInstance().createEditor(doc); @@ -94,7 +94,7 @@ public class FoldingStressTest extends LightPlatformTestCase { for (int i = 0; i < N; i++) { addAndCollapseFoldRegion(model, i, i+1, "/*...*/"); } - System.out.println((System.nanoTime() - t) / 1000000); // temporary code to investigate test blinking + LOG.debug(""+(System.nanoTime() - t) / 1000000); // temporary code to investigate test blinking })) .setup(()-> model.runBatchFoldingOperation(model::clearFoldRegions)) .assertTiming(); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/RangeMarkerTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/RangeMarkerTest.java index 79ec24d40510..f3564b91b14d 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/RangeMarkerTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/RangeMarkerTest.java @@ -810,7 +810,7 @@ public class RangeMarkerTest extends LightPlatformTestCase { public void testRandomStressEdit_NoCommand() { final Random gen = new Random(); int N_TRIES = Timings.adjustAccordingToMySpeed(7000, false); - System.out.println("N_TRIES = " + N_TRIES); + LOG.debug("N_TRIES = " + N_TRIES); DocumentEx document = null; final int N = 100; for (int tryn = 0; tryn < N_TRIES; tryn++) { diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/fileTypes/impl/FileTypesTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/fileTypes/impl/FileTypesTest.java index 1f2904459829..4cb36965961a 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/fileTypes/impl/FileTypesTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/fileTypes/impl/FileTypesTest.java @@ -322,7 +322,8 @@ public class FileTypesTest extends PlatformTestCase { } private static void log(String message) { - System.out.println(message); + LOG.debug(message); + //System.out.println(message); } private void ensureRedetected(VirtualFile vFile, Set detectorCalled) { @@ -707,8 +708,7 @@ public class FileTypesTest extends PlatformTestCase { //ra.setLength(ra.length()+(isText ? 1 : -1)); //ra.close(); //LocalFileSystem.getInstance().refreshFiles(Collections.singletonList(virtualFile)); - System.out - .println(i + "; f = " + f.length() + "; virtualFile=" + virtualFile.getLength() + "; type=" + virtualFile.getFileType()); + LOG.debug(i + "; f = " + f.length() + "; virtualFile=" + virtualFile.getLength() + "; type=" + virtualFile.getFileType()); //Thread.sleep(random.nextInt(100)); } } @@ -744,7 +744,7 @@ public class FileTypesTest extends PlatformTestCase { for (int i = 0; i < N; i++) { ApplicationManager.getApplication().runReadAction(() -> { String text = psiFile.getText(); - System.out.println("text = " + text.length()); + LOG.debug("text = " + text.length()); //if (!virtualFile.getFileType().isBinary()) { // LoadTextUtil.loadText(virtualFile); //} @@ -753,7 +753,7 @@ public class FileTypesTest extends PlatformTestCase { try { FileUtil.appendToFile(f, StringUtil.repeatSymbol(' ', 50)); LocalFileSystem.getInstance().refreshFiles(Collections.singletonList(virtualFile)); - System.out.println("f = " + f.length()+"; virtualFile="+virtualFile.getLength()+"; psiFile="+psiFile.isValid()+"; type="+virtualFile.getFileType()); + LOG.debug("f = " + f.length()+"; virtualFile="+virtualFile.getLength()+"; psiFile="+psiFile.isValid()+"; type="+virtualFile.getFileType()); } catch (IOException e) { throw new RuntimeException(e); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java index 832eb18a170d..90e0653f7e46 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java @@ -115,7 +115,7 @@ public class ProgressIndicatorTest extends LightPlatformTestCase { alarm.cancelAllRequests(); }, "", false, getProject(), null, ""); long averageDelay = ArrayUtil.averageAmongMedians(times.toNativeArray(), 5); - System.out.println("averageDelay = " + averageDelay); + LOG.debug("averageDelay = " + averageDelay); assertTrue(averageDelay < CoreProgressManager.CHECK_CANCELED_DELAY_MILLIS *3); } diff --git a/platform/util/testSrc/com/intellij/util/lang/UrlClassLoaderTest.java b/platform/util/testSrc/com/intellij/util/lang/UrlClassLoaderTest.java index 684e64194a6e..cc23fd3e2a2f 100644 --- a/platform/util/testSrc/com/intellij/util/lang/UrlClassLoaderTest.java +++ b/platform/util/testSrc/com/intellij/util/lang/UrlClassLoaderTest.java @@ -123,7 +123,7 @@ public class UrlClassLoaderTest { assertNotNull(findResource(loader, name, random.nextBoolean())); } catch (Throwable e) { - System.out.println("Failed loading " + name); + System.err.println("Failed loading " + name); throw new RuntimeException(e); } } diff --git a/spellchecker/testSrc/com/intellij/spellchecker/inspection/SpellcheckerPerformanceTest.java b/spellchecker/testSrc/com/intellij/spellchecker/inspection/SpellcheckerPerformanceTest.java index c58d8ecbd862..b4ccaf8c1461 100644 --- a/spellchecker/testSrc/com/intellij/spellchecker/inspection/SpellcheckerPerformanceTest.java +++ b/spellchecker/testSrc/com/intellij/spellchecker/inspection/SpellcheckerPerformanceTest.java @@ -40,7 +40,7 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase protected void setUp() throws Exception { long start = System.currentTimeMillis(); super.setUp(); - System.out.println("setUp took " + (System.currentTimeMillis() - start) + " ms"); + LOG.debug("setUp took " + (System.currentTimeMillis() - start) + " ms"); } public void testLargeTextFileWithManyTypos() { @@ -49,17 +49,17 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase long start = System.currentTimeMillis(); VirtualFile file = myFixture.addFileToProject("foo.txt", text).getVirtualFile(); - System.out.println("creation took " + (System.currentTimeMillis() - start) + " ms"); + LOG.debug("creation took " + (System.currentTimeMillis() - start) + " ms"); start = System.currentTimeMillis(); myFixture.configureFromExistingVirtualFile(file); - System.out.println("configure took " + (System.currentTimeMillis() - start) + " ms"); + LOG.debug("configure took " + (System.currentTimeMillis() - start) + " ms"); myFixture.enableInspections(getInspectionTools()); start = System.currentTimeMillis(); assertSize(typoCount, runLocalInspections()); - System.out.println("warm-up took " + (System.currentTimeMillis() - start) + " ms"); + LOG.debug("warm-up took " + (System.currentTimeMillis() - start) + " ms"); PlatformTestUtil.startPerformanceTest("many typos highlighting", 12_000, () -> { DaemonCodeAnalyzer.getInstance(getProject()).restart(); @@ -73,16 +73,16 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase long start = System.currentTimeMillis(); VirtualFile file = myFixture.addFileToProject("foo.java", text).getVirtualFile(); - System.out.println("creation took " + (System.currentTimeMillis() - start) + " ms"); + LOG.debug("creation took " + (System.currentTimeMillis() - start) + " ms"); start = System.currentTimeMillis(); myFixture.configureFromExistingVirtualFile(file); - System.out.println("configure took " + (System.currentTimeMillis() - start) + " ms"); + LOG.debug("configure took " + (System.currentTimeMillis() - start) + " ms"); start = System.currentTimeMillis(); List infos = runLocalInspections(); assertEmpty(infos); - System.out.println("warm-up took " + (System.currentTimeMillis() - start) + " ms"); + LOG.debug("warm-up took " + (System.currentTimeMillis() - start) + " ms"); PlatformTestUtil.startPerformanceTest("many whitespaces highlighting", 4500, () -> { DaemonCodeAnalyzer.getInstance(getProject()).restart(); @@ -129,8 +129,9 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase PlatformTestUtil.startPerformanceTest("long word for spelling", expectedTime, () -> { try{ splitter.split(text, TextRange.allOf(text), (textRange) -> {}); - }catch(ProcessCanceledException pce){ - System.out.println("pce is thrown"); + } + catch(ProcessCanceledException pce){ + System.err.println("pce is thrown"); } }).attempts(1).assertTiming(); } diff --git a/xml/tests/src/com/intellij/psi/formatter/XmlFormatterTest.java b/xml/tests/src/com/intellij/psi/formatter/XmlFormatterTest.java index 08c6f830ed22..0b7f894e5308 100644 --- a/xml/tests/src/com/intellij/psi/formatter/XmlFormatterTest.java +++ b/xml/tests/src/com/intellij/psi/formatter/XmlFormatterTest.java @@ -230,8 +230,8 @@ public class XmlFormatterTest extends XmlFormatterTestBase { long memoryAfter = currentFreeMemory(); long timeAfter = System.currentTimeMillis(); - System.out.println("\nMEMORY: " + (memoryAfter - memoryBefore)); - System.out.println("\nTIME: " + (timeAfter - timeBefore)); + LOG.debug("\nMEMORY: " + (memoryAfter - memoryBefore)); + LOG.debug("\nTIME: " + (timeAfter - timeBefore)); } private void doWrapAlways(String resultNumber, boolean align, int rightMargin) throws Exception { diff --git a/xml/tests/src/com/intellij/xml/XmlParsingTest.java b/xml/tests/src/com/intellij/xml/XmlParsingTest.java index 5b90768f8ad5..2886ef25cf13 100644 --- a/xml/tests/src/com/intellij/xml/XmlParsingTest.java +++ b/xml/tests/src/com/intellij/xml/XmlParsingTest.java @@ -197,7 +197,7 @@ public class XmlParsingTest extends ParsingTestCase { lexer.advance(); count++; } - System.out.println("Plain lexing took " + (System.currentTimeMillis() - time) + "ms lexems count:" + count); + LOG.debug("Plain lexing took " + (System.currentTimeMillis() - time) + "ms lexems count:" + count); } private static void transformAllChildren(final ASTNode file) { @@ -211,7 +211,7 @@ public class XmlParsingTest extends ParsingTestCase { long time = System.currentTimeMillis(); final PsiFile file = createFile("test.xml", text); transformAllChildren(file.getNode()); - System.out.println("Old parsing took " + (System.currentTimeMillis() - time) + "ms"); + LOG.debug("Old parsing took " + (System.currentTimeMillis() - time) + "ms"); int index = 0; while (index++ < 10) { newParsing(text); @@ -222,7 +222,7 @@ public class XmlParsingTest extends ParsingTestCase { index++; } while ((firstLeaf = TreeUtil.nextLeaf(firstLeaf, null)) != null); - System.out.println("For " + index + " lexems"); + LOG.debug("For " + index + " lexems"); } public void _testReparsePerformance() throws Exception { @@ -240,7 +240,7 @@ public class XmlParsingTest extends ParsingTestCase { final long tm = System.currentTimeMillis(); doc.insertString(0, ""); PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); - System.out.println("Reparsed for: " + (System.currentTimeMillis() - tm)); + LOG.debug("Reparsed for: " + (System.currentTimeMillis() - tm)); } }).useLegacyScaling().assertTiming()); } @@ -250,7 +250,7 @@ public class XmlParsingTest extends ParsingTestCase { long time = System.currentTimeMillis(); final PsiFile file = createFile("test.xml", text); transformAllChildren(file.getNode()); - System.out.println("Old parsing took " + (System.currentTimeMillis() - time) + "ms"); + LOG.debug("Old parsing took " + (System.currentTimeMillis() - time) + "ms"); int index = 0; while (index++ < 10) { newParsing(text); @@ -261,7 +261,7 @@ public class XmlParsingTest extends ParsingTestCase { index++; } while ((firstLeaf = TreeUtil.nextLeaf(firstLeaf, null)) != null); - System.out.println("For " + index + " lexems"); + LOG.debug("For " + index + " lexems"); } private static void newParsing(final String text) { @@ -269,7 +269,7 @@ public class XmlParsingTest extends ParsingTestCase { ASTFactory.lazy(XmlElementType.XML_FILE, text).getFirstChildNode(); // ensure parsed - System.out.println("parsed for " + (System.currentTimeMillis() - time) + "ms"); + LOG.debug("parsed for " + (System.currentTimeMillis() - time) + "ms"); } public void testXmlDecl() throws Exception {