mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 06:36:56 +07:00
[benchmarks] Renaming PerformanceTest* => Benchmark*
GitOrigin-RevId: 9963b84d51e1062acc262a8d3d3de1409a708e3b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f4c5a365ab
commit
cdf91bf213
@@ -3,7 +3,7 @@ package com.intellij.spellchecker.dataset
|
||||
|
||||
import com.intellij.spellchecker.SpellCheckerManager
|
||||
import com.intellij.spellchecker.inspection.SpellcheckerInspectionTestCase
|
||||
import com.intellij.tools.ide.metrics.benchmark.PerformanceTestUtil
|
||||
import com.intellij.tools.ide.metrics.benchmark.Benchmark
|
||||
|
||||
|
||||
class DataSetPerformanceTest: SpellcheckerInspectionTestCase() {
|
||||
@@ -12,7 +12,7 @@ class DataSetPerformanceTest: SpellcheckerInspectionTestCase() {
|
||||
val manager = SpellCheckerManager.getInstance(project)
|
||||
val total = Datasets.missp.flatMap { it.misspellings + it.word }.size
|
||||
|
||||
PerformanceTestUtil.newPerformanceTest("highlight ${total} words in missp") {
|
||||
Benchmark.newBenchmark("highlight ${total} words in missp") {
|
||||
for (word in Datasets.missp) {
|
||||
manager.hasProblem(word.word)
|
||||
for (missp in word.misspellings) {
|
||||
@@ -26,7 +26,7 @@ class DataSetPerformanceTest: SpellcheckerInspectionTestCase() {
|
||||
val manager = SpellCheckerManager.getInstance(project)
|
||||
val total = Datasets.words.flatMap { it.misspellings + it.word }.size
|
||||
|
||||
PerformanceTestUtil.newPerformanceTest("highlight ${total} words in words") {
|
||||
Benchmark.newBenchmark("highlight ${total} words in words") {
|
||||
for (word in Datasets.words) {
|
||||
manager.hasProblem(word.word)
|
||||
for (missp in word.misspellings) {
|
||||
@@ -41,7 +41,7 @@ class DataSetPerformanceTest: SpellcheckerInspectionTestCase() {
|
||||
val manager = SpellCheckerManager.getInstance(project)
|
||||
val total = Datasets.wordsCamelCase.flatMap { it.misspellings + it.word }.size
|
||||
|
||||
PerformanceTestUtil.newPerformanceTest("highlight ${total} words in camel-case") {
|
||||
Benchmark.newBenchmark("highlight ${total} words in camel-case") {
|
||||
for (word in Datasets.wordsCamelCase) {
|
||||
manager.hasProblem(word.word)
|
||||
for (missp in word.misspellings) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.spellchecker.inspections.*;
|
||||
import com.intellij.tools.ide.metrics.benchmark.PerformanceTestUtil;
|
||||
import com.intellij.tools.ide.metrics.benchmark.Benchmark;
|
||||
import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -57,7 +57,7 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase
|
||||
|
||||
DaemonCodeAnalyzer.getInstance(getProject()).restart();
|
||||
int[] toIgnore = ignoreEverythingExceptInspections();
|
||||
PerformanceTestUtil.newPerformanceTest("many typos highlighting", () -> {
|
||||
Benchmark.newBenchmark("many typos highlighting", () -> {
|
||||
assertSize(typoCount, CodeInsightTestFixtureImpl.instantiateAndRun(myFixture.getFile(), myFixture.getEditor(), toIgnore, false));
|
||||
}).start();
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase
|
||||
assertEmpty(infos);
|
||||
LOG.debug("warm-up took " + (System.currentTimeMillis() - start) + " ms");
|
||||
|
||||
PerformanceTestUtil.newPerformanceTest("many whitespaces highlighting", () -> {
|
||||
Benchmark.newBenchmark("many whitespaces highlighting", () -> {
|
||||
DaemonCodeAnalyzer.getInstance(getProject()).restart();
|
||||
assertEmpty(runLocalInspections());
|
||||
}).start();
|
||||
@@ -123,7 +123,7 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase
|
||||
}
|
||||
|
||||
private static void doSplitterPerformanceTest(String text, Splitter splitter) {
|
||||
PerformanceTestUtil.newPerformanceTest("long word for spelling", () -> {
|
||||
Benchmark.newBenchmark("long word for spelling", () -> {
|
||||
try {
|
||||
splitter.split(text, TextRange.allOf(text), (textRange) -> {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user