[unit perf tests] AT-644 Renaming

GitOrigin-RevId: 464b77181de9f1e0cc6de2623201635c405ee4c3
This commit is contained in:
Nikita Kudrin
2024-02-07 15:42:42 +02:00
committed by intellij-monorepo-bot
parent 33d338611b
commit 3dce2dce2f
120 changed files with 569 additions and 578 deletions

View File

@@ -12,28 +12,28 @@ class DataSetPerformanceTest: SpellcheckerInspectionTestCase() {
val manager = SpellCheckerManager.getInstance(project)
val total = Datasets.missp.flatMap { it.misspellings + it.word }.size
PlatformTestUtil.startPerformanceTest("highlight ${total} words in missp") {
PlatformTestUtil.newPerformanceTest("highlight ${total} words in missp") {
for (word in Datasets.missp) {
manager.hasProblem(word.word)
for (missp in word.misspellings) {
manager.hasProblem(missp)
}
}
}.assertTiming()
}.start()
}
fun `test words spellcheck performance`() {
val manager = SpellCheckerManager.getInstance(project)
val total = Datasets.words.flatMap { it.misspellings + it.word }.size
PlatformTestUtil.startPerformanceTest("highlight ${total} words in words") {
PlatformTestUtil.newPerformanceTest("highlight ${total} words in words") {
for (word in Datasets.words) {
manager.hasProblem(word.word)
for (missp in word.misspellings) {
manager.hasProblem(missp)
}
}
}.assertTiming()
}.start()
}
@@ -41,13 +41,13 @@ class DataSetPerformanceTest: SpellcheckerInspectionTestCase() {
val manager = SpellCheckerManager.getInstance(project)
val total = Datasets.wordsCamelCase.flatMap { it.misspellings + it.word }.size
PlatformTestUtil.startPerformanceTest("highlight ${total} words in camel-case") {
PlatformTestUtil.newPerformanceTest("highlight ${total} words in camel-case") {
for (word in Datasets.wordsCamelCase) {
manager.hasProblem(word.word)
for (missp in word.misspellings) {
manager.hasProblem(missp)
}
}
}.assertTiming()
}.start()
}
}

View File

@@ -57,9 +57,9 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase
DaemonCodeAnalyzer.getInstance(getProject()).restart();
int[] toIgnore = ignoreEverythingExceptInspections();
PlatformTestUtil.startPerformanceTest("many typos highlighting", () -> {
PlatformTestUtil.newPerformanceTest("many typos highlighting", () -> {
assertSize(typoCount, CodeInsightTestFixtureImpl.instantiateAndRun(myFixture.getFile(), myFixture.getEditor(), toIgnore, false));
}).assertTiming();
}).start();
}
public void testManyWhitespaces() {
@@ -79,10 +79,10 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase
assertEmpty(infos);
LOG.debug("warm-up took " + (System.currentTimeMillis() - start) + " ms");
PlatformTestUtil.startPerformanceTest("many whitespaces highlighting", () -> {
PlatformTestUtil.newPerformanceTest("many whitespaces highlighting", () -> {
DaemonCodeAnalyzer.getInstance(getProject()).restart();
assertEmpty(runLocalInspections());
}).assertTiming();
}).start();
}
public void testVeryLongEmail() {
@@ -123,14 +123,14 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase
}
private static void doSplitterPerformanceTest(String text, Splitter splitter) {
PlatformTestUtil.startPerformanceTest("long word for spelling", () -> {
PlatformTestUtil.newPerformanceTest("long word for spelling", () -> {
try {
splitter.split(text, TextRange.allOf(text), (textRange) -> {});
}
catch (ProcessCanceledException pce) {
System.err.println("pce is thrown");
}
}).attempts(1).assertTiming();
}).attempts(1).start();
}
@NotNull