diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/impl/DaemonRespondToChangesTest.java b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/impl/DaemonRespondToChangesTest.java index c139275b5bd5..060891f0bef0 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/impl/DaemonRespondToChangesTest.java +++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/impl/DaemonRespondToChangesTest.java @@ -1224,7 +1224,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase { text.append(".toString();}"); configureByText(StdFileTypes.JAVA, text.toString()); - PlatformTestUtil.startPerformanceTest("too many tree visitors", 30000, () -> { + PlatformTestUtil.startPerformanceTest("tree visitors", 30000, () -> { List infos = highlightErrors(); assertEmpty(infos); type("kjhgas"); diff --git a/java/java-tests/testSrc/com/intellij/java/find/impl/FindManagerTest.java b/java/java-tests/testSrc/com/intellij/java/find/impl/FindManagerTest.java index 067bf1c9d62b..297e78573b04 100644 --- a/java/java-tests/testSrc/com/intellij/java/find/impl/FindManagerTest.java +++ b/java/java-tests/testSrc/com/intellij/java/find/impl/FindManagerTest.java @@ -596,10 +596,10 @@ public class FindManagerTest extends DaemonAnalyzerTestCase { ThrowableRunnable test = () -> assertSize(lineCount, findUsages(findModel)); findModel.setCustomScope(GlobalSearchScope.fileScope(psiFile)); - PlatformTestUtil.startPerformanceTest("slow", 400, test).attempts(2).usesAllCPUCores().useLegacyScaling().assertTiming(); + PlatformTestUtil.startPerformanceTest("find usages in global", 400, test).attempts(2).usesAllCPUCores().useLegacyScaling().assertTiming(); findModel.setCustomScope(new LocalSearchScope(psiFile)); - PlatformTestUtil.startPerformanceTest("slow", 400, test).attempts(2).usesAllCPUCores().useLegacyScaling().assertTiming(); + PlatformTestUtil.startPerformanceTest("find usages in local", 400, test).attempts(2).usesAllCPUCores().useLegacyScaling().assertTiming(); } finally { fixture.tearDown(); diff --git a/java/java-tests/testSrc/com/intellij/java/psi/formatter/performance/JavaSmartReformatPerformanceTest.java b/java/java-tests/testSrc/com/intellij/java/psi/formatter/performance/JavaSmartReformatPerformanceTest.java index b7a6e624ebf7..207cfa577e4d 100644 --- a/java/java-tests/testSrc/com/intellij/java/psi/formatter/performance/JavaSmartReformatPerformanceTest.java +++ b/java/java-tests/testSrc/com/intellij/java/psi/formatter/performance/JavaSmartReformatPerformanceTest.java @@ -47,7 +47,7 @@ public class JavaSmartReformatPerformanceTest extends AbstractJavaFormatterTest List ranges = ContainerUtil.newArrayList(new TextRange(6682, 6686)); PlatformTestUtil - .startPerformanceTest("Testing smart reformat on big file", 110, getReformatRunnable(file, ranges)) + .startPerformanceTest("smart reformat on big file", 110, getReformatRunnable(file, ranges)) .setup(getSetupRunnable(initial, document)) .useLegacyScaling().assertTiming(); diff --git a/java/java-tests/testSrc/com/intellij/java/psi/impl/smartPointers/SmartPsiElementPointersTest.java b/java/java-tests/testSrc/com/intellij/java/psi/impl/smartPointers/SmartPsiElementPointersTest.java index 4d6b9141debe..3f3f897fd26d 100644 --- a/java/java-tests/testSrc/com/intellij/java/psi/impl/smartPointers/SmartPsiElementPointersTest.java +++ b/java/java-tests/testSrc/com/intellij/java/psi/impl/smartPointers/SmartPsiElementPointersTest.java @@ -918,7 +918,7 @@ public class SmartPsiElementPointersTest extends CodeInsightTestCase { String text = StringUtil.repeatSymbol(' ', 100000); PsiFile file = createFile("a.txt", text); - PlatformTestUtil.startPerformanceTest("", 2000, () -> { + PlatformTestUtil.startPerformanceTest(getTestName(false), 2000, () -> { List pointers = new ArrayList<>(); for (int i = 0; i < text.length() - 1; i++) { pointers.add(getPointerManager().createSmartPsiFileRangePointer(file, new TextRange(i, i + 1))); diff --git a/java/java-tests/testSrc/com/intellij/java/psi/resolve/ResolveClassTest.java b/java/java-tests/testSrc/com/intellij/java/psi/resolve/ResolveClassTest.java index 5c1c2329be7e..d8be46c94feb 100644 --- a/java/java-tests/testSrc/com/intellij/java/psi/resolve/ResolveClassTest.java +++ b/java/java-tests/testSrc/com/intellij/java/psi/resolve/ResolveClassTest.java @@ -213,7 +213,7 @@ public class ResolveClassTest extends ResolveTestCase { PsiReference ref = configure(); ensureIndexUpToDate(); - PlatformTestUtil.startPerformanceTest("exponent?", 500, () -> assertNull(ref.resolve())) + PlatformTestUtil.startPerformanceTest(getTestName(false), 500, () -> assertNull(ref.resolve())) .attempts(1).assertTiming(); } @@ -245,7 +245,7 @@ public class ResolveClassTest extends ResolveTestCase { ensureIndexUpToDate(); System.gc(); - PlatformTestUtil.startPerformanceTest("exponent?", 20000, () -> assertNull(ref.resolve())) + PlatformTestUtil.startPerformanceTest(getTestName(false), 20000, () -> assertNull(ref.resolve())) .attempts(1).assertTiming(); } diff --git a/java/java-tests/testSrc/com/intellij/java/psi/search/JavaOverrideMethodsSearchTest.java b/java/java-tests/testSrc/com/intellij/java/psi/search/JavaOverrideMethodsSearchTest.java index 8d75f979686f..1dc5a204b219 100644 --- a/java/java-tests/testSrc/com/intellij/java/psi/search/JavaOverrideMethodsSearchTest.java +++ b/java/java-tests/testSrc/com/intellij/java/psi/search/JavaOverrideMethodsSearchTest.java @@ -37,7 +37,7 @@ public class JavaOverrideMethodsSearchTest extends LightCodeInsightFixtureTestCa final PsiMethod method = PsiTreeUtil.getParentOfType(getFile().findElementAt(getEditor().getCaretModel().getOffset()), PsiMethod.class); assertNotNull(method); final PsiMethod superMethod = method.findDeepestSuperMethods()[0]; - PlatformTestUtil.startPerformanceTest("Only local scope should be processed", 100, () -> { + PlatformTestUtil.startPerformanceTest("search in local scope", 100, () -> { final Collection all = OverridingMethodsSearch.search(superMethod, new LocalSearchScope(getFile()), true).findAll(); assertTrue(all.size() == 1); }).useLegacyScaling().attempts(1).assertTiming(); diff --git a/platform/platform-tests/testSrc/com/intellij/ide/highlighter/custom/CustomFileTypeLexerTest.groovy b/platform/platform-tests/testSrc/com/intellij/ide/highlighter/custom/CustomFileTypeLexerTest.groovy index b4807541b187..1d501e7bf444 100644 --- a/platform/platform-tests/testSrc/com/intellij/ide/highlighter/custom/CustomFileTypeLexerTest.groovy +++ b/platform/platform-tests/testSrc/com/intellij/ide/highlighter/custom/CustomFileTypeLexerTest.groovy @@ -482,7 +482,7 @@ NUMBER ('0yabc0') CharSequence bombed = new SlowCharSequence(text) ThrowableRunnable cl = { LexerTestCase.printTokens(bombed, 0, new CustomFileTypeLexer(table)) } as ThrowableRunnable - PlatformTestUtil.startPerformanceTest("slow", 10000, cl).useLegacyScaling().assertTiming() + PlatformTestUtil.startPerformanceTest(getTestName(false), 10000, cl).useLegacyScaling().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 fc0d44e1bba3..892077f16d48 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 @@ -1130,7 +1130,7 @@ public class RangeMarkerTest extends LightPlatformTestCase { } markupModel.addRangeHighlighter(N / 2, N / 2 + 1, 0, null, HighlighterTargetArea.LINES_IN_RANGE); - PlatformTestUtil.startPerformanceTest("slow highlighters lookup", (int)(N*Math.log(N)/1000), () -> { + PlatformTestUtil.startPerformanceTest("highlighters lookup", (int)(N*Math.log(N)/1000), () -> { List list = new ArrayList<>(); CommonProcessors.CollectProcessor coll = new CommonProcessors.CollectProcessor<>(list); for (int i=0; i{ + PlatformTestUtil.startPerformanceTest("RM.getStartOffset", 15000, ()->{ doc.insertString(0, " "); for (int i=0; i<1000; i++) { for (RangeMarker rm : markers) { @@ -1321,7 +1321,7 @@ public class RangeMarkerTest extends LightPlatformTestCase { RangeMarker marker = doc.createRangeMarker(start, end); markers.add(marker); } - PlatformTestUtil.startPerformanceTest("RM", 20000, ()->{ + PlatformTestUtil.startPerformanceTest("RM.getStartOffset", 20000, ()->{ doc.insertString(0, " "); for (int i=0; i<1000; i++) { for (int j = 0; j < markers.size(); j++) { @@ -1346,7 +1346,7 @@ public class RangeMarkerTest extends LightPlatformTestCase { RangeMarker marker = doc.createRangeMarker(start, end); markers.add(marker); } - PlatformTestUtil.startPerformanceTest("RM", 10000, ()->{ + PlatformTestUtil.startPerformanceTest("insert/delete string", 10000, ()->{ for (int i=0; i<15000; i++) { doc.insertString(0, " "); doc.deleteString(0, 1); @@ -1361,7 +1361,7 @@ public class RangeMarkerTest extends LightPlatformTestCase { DocumentEx doc = new DocumentImpl(StringUtil.repeat("blah", 1000)); int N = 100_000; List markers = new ArrayList<>(N); - PlatformTestUtil.startPerformanceTest("RM", 2000, ()->{ + PlatformTestUtil.startPerformanceTest("createRM", 2000, ()->{ for (int i = 0; i < N; i++) { int start = i % doc.getTextLength(); int end = start + 1; @@ -1384,7 +1384,7 @@ public class RangeMarkerTest extends LightPlatformTestCase { RangeMarker marker = doc.createRangeMarker(start, end); markers.add(marker); } - PlatformTestUtil.startPerformanceTest("RM", 2000, ()->{ + PlatformTestUtil.startPerformanceTest("processRangeMarkersOverlappingWith", 2000, ()->{ for (int it=0;it<50;it++) { for (int i=1; i overlaps = new ArrayList<>(); 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 ea847716fee3..ca507378a15a 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 @@ -107,7 +107,7 @@ public class FileTypesTest extends PlatformTestCase { String name = String.valueOf(i % 10 * 10 + i * 100 + i + 1); names[i] = name + name + name + name; } - PlatformTestUtil.startPerformanceTest("ignore perf", 700, () -> { + PlatformTestUtil.startPerformanceTest("isFileIgnored", 700, () -> { for (int i=0;i<1000;i++) { for (String name : names) { myFileTypeManager.isFileIgnored(name); 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 b1b578f5834f..2068ce884cbd 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 @@ -349,7 +349,7 @@ public class ProgressIndicatorTest extends LightPlatformTestCase { } public void testProgressPerformance() { - PlatformTestUtil.startPerformanceTest("progress", 100, () -> { + PlatformTestUtil.startPerformanceTest("executeProcessUnderProgress", 100, () -> { EmptyProgressIndicator indicator = new EmptyProgressIndicator(); for (int i=0;i<100000;i++) { ProgressManager.getInstance().executeProcessUnderProgress(EmptyRunnable.getInstance(), indicator); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/util/io/FileUtilPerformanceTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/util/io/FileUtilPerformanceTest.java index a42c563921af..05d923294ad1 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/util/io/FileUtilPerformanceTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/util/io/FileUtilPerformanceTest.java @@ -16,7 +16,6 @@ package com.intellij.openapi.util.io; import com.intellij.testFramework.PlatformTestUtil; -import com.intellij.util.ThrowableRunnable; import org.junit.Test; import static org.junit.Assert.assertEquals; @@ -31,7 +30,7 @@ public class FileUtilPerformanceTest { public void toCanonicalPath() throws Exception { assertEquals(myCanonicalPath, FileUtil.toCanonicalPath(myTestPath)); - PlatformTestUtil.startPerformanceTest("", 1000, () -> { + PlatformTestUtil.startPerformanceTest("toCanonicalPath", 1000, () -> { for (int i = 0; i < 1000000; ++i) { final String canonicalPath = FileUtil.toCanonicalPath(myTestPath, '/'); assert canonicalPath != null && canonicalPath.length() == 18 : canonicalPath; @@ -43,7 +42,7 @@ public class FileUtilPerformanceTest { public void toCanonicalPathSimple() throws Exception { assertEquals(mySimpleTestPath, FileUtil.toCanonicalPath(mySimpleTestPath)); - PlatformTestUtil.startPerformanceTest("", 50, () -> { + PlatformTestUtil.startPerformanceTest("toCanonicalPathSimple", 50, () -> { for (int i = 0; i < 1000000; ++i) { final String canonicalPath = FileUtil.toCanonicalPath(mySimpleTestPath, '/'); assert canonicalPath != null && canonicalPath.length() == 8 : canonicalPath; @@ -55,7 +54,7 @@ public class FileUtilPerformanceTest { public void isAncestor() throws Exception { assertTrue(FileUtil.isAncestor(myTestPath, myCanonicalPath, false)); - PlatformTestUtil.startPerformanceTest("", 4000, () -> { + PlatformTestUtil.startPerformanceTest("isAncestor", 4000, () -> { for (int i = 0; i < 1000000; ++i) { assert FileUtil.isAncestor(myTestPath, myCanonicalPath, false); assert !FileUtil.isAncestor(myTestPath, myCanonicalPath, true); diff --git a/platform/platform-tests/testSrc/com/intellij/psi/tree/TokenSetTest.java b/platform/platform-tests/testSrc/com/intellij/psi/tree/TokenSetTest.java index cdc09eb65f94..19aa2cfb28e2 100644 --- a/platform/platform-tests/testSrc/com/intellij/psi/tree/TokenSetTest.java +++ b/platform/platform-tests/testSrc/com/intellij/psi/tree/TokenSetTest.java @@ -123,7 +123,7 @@ public class TokenSetTest { final TokenSet set = TokenSet.create(); final int shift = new Random().nextInt(500000); - PlatformTestUtil.startPerformanceTest("TokenSet.contains() performance", 25, () -> { + PlatformTestUtil.startPerformanceTest("TokenSet.contains()", 25, () -> { for (int i = 0; i < 1000000; i++) { final IElementType next = elementTypes[(i + shift) % elementTypes.length]; assertFalse(set.contains(next)); diff --git a/platform/platform-tests/testSrc/com/intellij/psi/util/NameUtilMatchingTest.java b/platform/platform-tests/testSrc/com/intellij/psi/util/NameUtilMatchingTest.java index 23b7f2411b39..e5b2eaca1d22 100644 --- a/platform/platform-tests/testSrc/com/intellij/psi/util/NameUtilMatchingTest.java +++ b/platform/platform-tests/testSrc/com/intellij/psi/util/NameUtilMatchingTest.java @@ -669,7 +669,7 @@ public class NameUtilMatchingTest extends UsefulTestCase { nonMatching.add(NameUtil.buildMatcher(s, NameUtil.MatchingCaseSensitivity.NONE)); } - PlatformTestUtil.startPerformanceTest("Matcher is slow", 4500, () -> { + PlatformTestUtil.startPerformanceTest("Matching", 4500, () -> { for (int i = 0; i < 100000; i++) { for (MinusculeMatcher matcher : matching) { Assert.assertTrue(matcher.toString(), matcher.matches(longName)); @@ -683,7 +683,7 @@ public class NameUtilMatchingTest extends UsefulTestCase { } public void testOnlyUnderscoresPerformance() { - PlatformTestUtil.startPerformanceTest("Matcher is exponential", 300, () -> { + PlatformTestUtil.startPerformanceTest(getTestName(false), 300, () -> { String small = StringUtil.repeat("_", 50); String big = StringUtil.repeat("_", small.length() + 1); assertMatches("*" + small, big); @@ -692,7 +692,7 @@ public class NameUtilMatchingTest extends UsefulTestCase { } public void testRepeatedLetterPerformance() { - PlatformTestUtil.startPerformanceTest("Matcher is exponential", 300, () -> { + PlatformTestUtil.startPerformanceTest(getTestName(false), 300, () -> { String big = StringUtil.repeat("Aaaaaa", 50); assertMatches("aaaaaaaaaaaaaaaaaaaaaaaa", big); assertDoesntMatch("aaaaaaaaaaaaaaaaaaaaaaaab", big); diff --git a/platform/platform-tests/testSrc/com/intellij/ui/FileNameSplittingTest.java b/platform/platform-tests/testSrc/com/intellij/ui/FileNameSplittingTest.java index 16861665eb48..1e709a29e70a 100644 --- a/platform/platform-tests/testSrc/com/intellij/ui/FileNameSplittingTest.java +++ b/platform/platform-tests/testSrc/com/intellij/ui/FileNameSplittingTest.java @@ -16,7 +16,6 @@ package com.intellij.ui; import com.intellij.testFramework.PlatformTestUtil; -import com.intellij.util.ThrowableRunnable; import com.intellij.util.ui.FilePathSplittingPolicy; import junit.framework.TestCase; import org.jetbrains.annotations.NonNls; @@ -119,7 +118,7 @@ public class FileNameSplittingTest extends TestCase { public void testPerformance() { myPolicy = FilePathSplittingPolicy.SPLIT_BY_SEPARATOR; - PlatformTestUtil.startPerformanceTest("FileNameSplitting performance", 70, () -> { + PlatformTestUtil.startPerformanceTest("FileNameSplitting", 70, () -> { for (int i = 0; i < 100; i++) { for (int j = 0; j < FILE.getPath().length(); j++) myPolicy.getPresentableName(FILE, j); diff --git a/platform/platform-tests/testSrc/com/intellij/util/io/StringEnumeratorTest.java b/platform/platform-tests/testSrc/com/intellij/util/io/StringEnumeratorTest.java index 942040728854..1ee4077a22f5 100644 --- a/platform/platform-tests/testSrc/com/intellij/util/io/StringEnumeratorTest.java +++ b/platform/platform-tests/testSrc/com/intellij/util/io/StringEnumeratorTest.java @@ -162,7 +162,7 @@ public class StringEnumeratorTest extends TestCase { } }; - PlatformTestUtil.startPerformanceTest("PersistentStringEnumerator performance failed", 2500, () -> { + PlatformTestUtil.startPerformanceTest("PersistentStringEnumerator.enumerate", 2500, () -> { stringCache.addDeletedPairsListener(listener); for (int i = 0; i < 100000; ++i) { final String string = createRandomString(); diff --git a/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralReplaceTest.java b/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralReplaceTest.java index d255ea85ce9d..cdbbf0a03505 100644 --- a/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralReplaceTest.java +++ b/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralReplaceTest.java @@ -1729,7 +1729,7 @@ public class StructuralReplaceTest extends StructuralReplaceTestCase { options.setToShortenFQN(true); try { - PlatformTestUtil.startPerformanceTest("SSR should work fast", 3500, new ThrowableRunnable() { + PlatformTestUtil.startPerformanceTest("SSR", 3500, new ThrowableRunnable() { public void run() { doTest(testName, ext, message); } diff --git a/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java b/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java index 64a34665f6d6..88650667ea05 100644 --- a/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java +++ b/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java @@ -493,8 +493,8 @@ public class PlatformTestUtil { * example usage: {@code startPerformanceTest("calculating pi",100, testRunnable).cpuBound().assertTiming();} */ @Contract(pure = true) // to warn about not calling .assertTiming() in the end - public static TestInfo startPerformanceTest(@NonNls @NotNull String message, int expectedMs, @NotNull ThrowableRunnable test) { - return new TestInfo(test, expectedMs, message); + public static TestInfo startPerformanceTest(@NonNls @NotNull String what, int expectedMs, @NotNull ThrowableRunnable test) { + return new TestInfo(test, expectedMs, what); } public static boolean canRunTest(@NotNull Class testCaseClass) { @@ -544,16 +544,16 @@ public class PlatformTestUtil { private ThrowableRunnable setup; // to run before each test private int usedReferenceCpuCores = 1; private int attempts = 4; // number of retries if performance failed - private final String message; // to print on fail + private final String what; // to print on fail private boolean adjustForIO = false; // true if test uses IO, timings need to be re-calibrated according to this agent disk performance private boolean adjustForCPU = true; // true if test uses CPU, timings need to be re-calibrated according to this agent CPU speed private boolean useLegacyScaling; - private TestInfo(@NotNull ThrowableRunnable test, int expectedMs, String message) { + private TestInfo(@NotNull ThrowableRunnable test, int expectedMs, @NotNull String what) { this.test = test; this.expectedMs = expectedMs; assert expectedMs > 0 : "Expected must be > 0. Was: "+ expectedMs; - this.message = message; + this.what = what; } @Contract(pure = true) // to warn about not calling .assertTiming() in the end @@ -642,7 +642,7 @@ public class PlatformTestUtil { "\n Timings: %s" + "\n Threads: %s" + "\n GC stats: %s", - message, colorCode, Math.abs(percentage), percentage > 0 ? "more" : "less", + what, colorCode, Math.abs(percentage), percentage > 0 ? "more" : "less", expectedOnMyMachine, StringUtil.formatDuration(expectedOnMyMachine), duration, StringUtil.formatDuration(duration), Timings.getStatistics(), diff --git a/plugins/ant/tests/src/com/intellij/lang/ant/AntHighlightingTest.java b/plugins/ant/tests/src/com/intellij/lang/ant/AntHighlightingTest.java index 1db75e36a288..913bd22c1a84 100644 --- a/plugins/ant/tests/src/com/intellij/lang/ant/AntHighlightingTest.java +++ b/plugins/ant/tests/src/com/intellij/lang/ant/AntHighlightingTest.java @@ -110,7 +110,7 @@ public class AntHighlightingTest extends DaemonAnalyzerTestCase { try { myIgnoreInfos = true; - PlatformTestUtil.startPerformanceTest("Should be quite performant !", 25000, () -> doDoTest(true, false)).useLegacyScaling().assertTiming(); + PlatformTestUtil.startPerformanceTest("Big ant file highlighting", 25000, () -> doDoTest(true, false)).useLegacyScaling().assertTiming(); } finally { myIgnoreInfos = false; diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyStressPerformanceTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyStressPerformanceTest.groovy index d3364f08facd..6a870082f17a 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyStressPerformanceTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyStressPerformanceTest.groovy @@ -119,7 +119,7 @@ class GroovyStressPerformanceTest extends LightGroovyTestCase { myFixture.type 'foo {}\n' PsiDocumentManager.getInstance(project).commitAllDocuments() - PlatformTestUtil.startPerformanceTest("Reparse is not incremental", 10000, { + PlatformTestUtil.startPerformanceTest(getTestName(false), 10000, { story.toCharArray().each { myFixture.type it PsiDocumentManager.getInstance(project).commitAllDocuments() @@ -139,7 +139,7 @@ class GroovyStressPerformanceTest extends LightGroovyTestCase { } private void measureHighlighting(String text, int time) { - IdeaTestUtil.startPerformanceTest("slow", time, configureAndHighlight(text)).usesAllCPUCores().useLegacyScaling().assertTiming() + IdeaTestUtil.startPerformanceTest(getTestName(false), time, configureAndHighlight(text)).usesAllCPUCores().useLegacyScaling().assertTiming() } void testDeeplyNestedClosures() { @@ -273,7 +273,7 @@ while (true) { f.canoPath } ''' - IdeaTestUtil.startPerformanceTest("slow", 300, configureAndComplete(text)).usesAllCPUCores().useLegacyScaling().assertTiming() + IdeaTestUtil.startPerformanceTest(getTestName(false), 300, configureAndComplete(text)).usesAllCPUCores().useLegacyScaling().assertTiming() } void testClosureRecursion() { diff --git a/xml/dom-tests/tests/com/intellij/util/xml/DomPerformanceTest.java b/xml/dom-tests/tests/com/intellij/util/xml/DomPerformanceTest.java index 755dde798854..d38800132a0f 100644 --- a/xml/dom-tests/tests/com/intellij/util/xml/DomPerformanceTest.java +++ b/xml/dom-tests/tests/com/intellij/util/xml/DomPerformanceTest.java @@ -118,7 +118,7 @@ public class DomPerformanceTest extends DomHardCoreTestCase{ final XmlFile file = (XmlFile)getPsiManager().findFile(virtualFile); assertFalse(file.getNode().isParsed()); assertTrue(StringUtil.isNotEmpty(file.getText())); - PlatformTestUtil.startPerformanceTest("", 100, () -> assertNull(getDomManager().getFileElement(file))).useLegacyScaling().assertTiming(); + PlatformTestUtil.startPerformanceTest("DOM parsing", 100, () -> assertNull(getDomManager().getFileElement(file))).useLegacyScaling().assertTiming(); } public void testDontParseNamespacedDomFiles() throws Exception { diff --git a/xml/tests/src/com/intellij/codeInsight/XmlPerformanceTest.java b/xml/tests/src/com/intellij/codeInsight/XmlPerformanceTest.java index 5750af5fcfe9..0ba236c14d7c 100644 --- a/xml/tests/src/com/intellij/codeInsight/XmlPerformanceTest.java +++ b/xml/tests/src/com/intellij/codeInsight/XmlPerformanceTest.java @@ -68,7 +68,7 @@ public class XmlPerformanceTest extends LightQuickFixTestCase { doHighlighting(); myEditor.getSelectionModel().setSelection(0,myEditor.getDocument().getTextLength()); - PlatformTestUtil.startPerformanceTest("Fix long indent/unindent "+time, time, () -> { + PlatformTestUtil.startPerformanceTest("indent/unindent "+time, time, () -> { EditorActionManager.getInstance().getActionHandler("EditorIndentSelection").execute(myEditor, DataManager.getInstance().getDataContext()); EditorActionManager.getInstance().getActionHandler("EditorUnindentSelection").execute(myEditor, DataManager.getInstance().getDataContext()); diff --git a/xml/tests/src/com/intellij/psi/formatter/XmlPerformanceFormatterTest.java b/xml/tests/src/com/intellij/psi/formatter/XmlPerformanceFormatterTest.java index c780993587b8..09baad7b4ac6 100644 --- a/xml/tests/src/com/intellij/psi/formatter/XmlPerformanceFormatterTest.java +++ b/xml/tests/src/com/intellij/psi/formatter/XmlPerformanceFormatterTest.java @@ -58,14 +58,14 @@ public class XmlPerformanceFormatterTest extends XmlFormatterTestBase { } public void testReformatCodeFragment() throws Exception { - PlatformTestUtil.startPerformanceTest("reformat code fragment is slow", 6300, + PlatformTestUtil.startPerformanceTest("reformat code fragment", 6300, () -> checkFormattingDoesNotProduceException("performance")).useLegacyScaling().assertTiming(); } public void testPerformance3() throws Exception { final FileEditorManager editorManager = FileEditorManager.getInstance(getProject()); try { - PlatformTestUtil.startPerformanceTest("Fix xml formatter performance problem 3", 6800, createTestRunnable()).useLegacyScaling().assertTiming(); + PlatformTestUtil.startPerformanceTest("xml formatter", 6800, createTestRunnable()).useLegacyScaling().assertTiming(); highlight(); @@ -102,7 +102,7 @@ public class XmlPerformanceFormatterTest extends XmlFormatterTestBase { public void testPerformance4() throws Exception { final FileEditorManager editorManager = FileEditorManager.getInstance(getProject()); try { - PlatformTestUtil.startPerformanceTest("Fix xml formatter performance problem 4", 20000, createTestRunnable()).useLegacyScaling().assertTiming(); + PlatformTestUtil.startPerformanceTest("xml formatter", 20000, createTestRunnable()).useLegacyScaling().assertTiming(); } finally { editorManager.closeFile(editorManager.getSelectedFiles()[0]); @@ -123,7 +123,7 @@ public class XmlPerformanceFormatterTest extends XmlFormatterTestBase { public void testPerformance5() throws Exception { final FileEditorManager editorManager = FileEditorManager.getInstance(getProject()); try { - PlatformTestUtil.startPerformanceTest("Fix xml formatter performance problem 5", 10000, createTestRunnable()).useLegacyScaling().assertTiming(); + PlatformTestUtil.startPerformanceTest("xml formatter", 10000, createTestRunnable()).useLegacyScaling().assertTiming(); } finally { final VirtualFile[] selectedFiles = editorManager.getSelectedFiles(); @@ -136,7 +136,7 @@ public class XmlPerformanceFormatterTest extends XmlFormatterTestBase { public void testPerformance6() throws Exception { final FileEditorManager editorManager = FileEditorManager.getInstance(getProject()); try { - PlatformTestUtil.startPerformanceTest("Fix xml formatter performance problem 6", 20000, createTestRunnable()).useLegacyScaling().assertTiming(); + PlatformTestUtil.startPerformanceTest("xml formatter", 20000, createTestRunnable()).useLegacyScaling().assertTiming(); } finally { final VirtualFile[] selectedFiles = editorManager.getSelectedFiles();