package org.rust.ide.annotator

import com.intellij.testFramework.LightProjectDescriptor
import org.junit.experimental.categories.Category
import org.rust.Performance
import org.rust.lang.RustTestCaseBase

@Category(Performance::class)
class RustHighlightingPerformanceTest : RustTestCaseBase() {
    override val dataPath = "org/rust/ide/annotator/fixtures/performance"

    override fun getProjectDescriptor(): LightProjectDescriptor = WithStdlibRustProjectDescriptor()

    fun testHighlightingWithStdlib() {
        myFixture.copyDirectoryToProject("", "")

        myFixture.configureFromTempProjectFile("main.rs")

        val elapsed = myFixture.checkHighlighting()
        reportTeamCityMetric(name, elapsed)
    }

}


package org.rust.ide.annotator

import com.intellij.psi.stubs.StubUpdatingIndex
import com.intellij.testFramework.LightProjectDescriptor
import com.intellij.util.indexing.FileBasedIndex
import org.junit.experimental.categories.Category
import org.rust.Performance
import org.rust.lang.RustTestCaseBase

@Category(Performance::class)
class RustHighlightingPerformanceTest : RustTestCaseBase() {
    override val dataPath = "org/rust/ide/annotator/fixtures/performance"

    override fun setUp() {
        super.setUp()

        FileBasedIndex.getInstance().requestRebuild(StubUpdatingIndex.INDEX_ID)
    }

    override fun getProjectDescriptor(): LightProjectDescriptor = WithStdlibRustProjectDescriptor()

    fun testHighlightingWithStdlib() {
        myFixture.copyDirectoryToProject("", "")

        myFixture.configureFromTempProjectFile("main.rs")

        val elapsed = myFixture.checkHighlighting()
        reportTeamCityMetric(name, elapsed)
    }

}


Reset `RustImplIndex` on every test run
(IDX): Reset `RustImplIndex` on every test run

d9n/intellij-rust,himikof/intellij-rust,intellij-rust/intellij-rust,ujpv/intellij-rust,ujpv/intellij-rust,intellij-rust/intellij-rust,anton-okolelov/intellij-rust,anton-okolelov/intellij-rust,d9n/intellij-rust,alygin/intellij-rust,himikof/intellij-rust,Undin/intellij-rust,alygin/intellij-rust,d9n/intellij-rust,Undin/intellij-rust,alygin/intellij-rust,Undin/intellij-rust,ujpv/intellij-rust,d9n/intellij-rust,himikof/intellij-rust,Undin/intellij-rust,alygin/intellij-rust,Undin/intellij-rust,anton-okolelov/intellij-rust,alygin/intellij-rust,intellij-rust/intellij-rust,himikof/intellij-rust,Undin/intellij-rust,ujpv/intellij-rust,intellij-rust/intellij-rust,anton-okolelov/intellij-rust,intellij-rust/intellij-rust,intellij-rust/intellij-rust,anton-okolelov/intellij-rust,ujpv/intellij-rust,himikof/intellij-rust,d9n/intellij-rust