From a4cf21adef48b4a29174c074f95b9689c2f4d0dd Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Mon, 4 Jan 2021 19:44:20 +0100 Subject: [PATCH] Add perf the same project perf tests used for FIR for fe10 plugin --- idea/performanceTests/build.gradle.kts | 25 +++++++++++++++++++ ...rojectPerformanceComparisonFE10ImplTest.kt | 22 ++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/WholeProjectPerformanceComparisonFE10ImplTest.kt diff --git a/idea/performanceTests/build.gradle.kts b/idea/performanceTests/build.gradle.kts index 6319f63e597..5358c7a498b 100644 --- a/idea/performanceTests/build.gradle.kts +++ b/idea/performanceTests/build.gradle.kts @@ -146,5 +146,30 @@ task("aggregateResults", JavaExec::class) { args(listOf(File(rootDir, "build"))) } +projectTest(taskName = "fe10ProjectPerformanceTest") { + include("**/*WholeProjectPerformanceComparisonFE10ImplTest*") + + workingDir = rootDir + + jvmArgs?.removeAll { it.startsWith("-Xmx") } + + maxHeapSize = "3g" + jvmArgs("-DperformanceProjects=${System.getProperty("performanceProjects")}") + jvmArgs("-Didea.debug.mode=true") + jvmArgs("-DemptyProfile=${System.getProperty("emptyProfile")}") + jvmArgs("-XX:SoftRefLRUPolicyMSPerMB=50") + jvmArgs( + "-XX:+UseCompressedOops", + "-XX:+UseConcMarkSweepGC" + ) + + doFirst { + systemProperty("idea.home.path", intellijRootDir().canonicalPath) + project.findProperty("cacheRedirectorEnabled")?.let { + systemProperty("kotlin.test.gradle.import.arguments", "-PcacheRedirectorEnabled=$it") + } + } +} + testsJar() \ No newline at end of file diff --git a/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/WholeProjectPerformanceComparisonFE10ImplTest.kt b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/WholeProjectPerformanceComparisonFE10ImplTest.kt new file mode 100644 index 00000000000..1d68f1b4848 --- /dev/null +++ b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/WholeProjectPerformanceComparisonFE10ImplTest.kt @@ -0,0 +1,22 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.perf + +import org.jetbrains.kotlin.idea.perf.common.AbstractWholeProjectPerformanceComparisonTest + +class WholeProjectPerformanceComparisonFE10ImplTest : AbstractWholeProjectPerformanceComparisonTest() { + override val testPrefix: String = "FE10" + override fun getWarmUpProject(): WarmUpProject = warmUpProject + + fun testRustPlugin() { + doTestRustPlugin() + } + + companion object { + private val hwStats: Stats = Stats("FE10 warmup project") + private val warmUpProject = WarmUpProject(hwStats) + } +} \ No newline at end of file