Add Kvision project to build regression benchmarks
This project covers Kotlin/JS build performance ^KT-51380 Fixed
This commit is contained in:
-3
@@ -33,9 +33,6 @@ class Scenario {
|
||||
applyAbiChange.add(pathToClassFile)
|
||||
}
|
||||
|
||||
/**
|
||||
* Currently not-working: https://github.com/gradle/gradle-profiler/issues/378
|
||||
*/
|
||||
fun applyNonAbiChangeTo(pathToClassFile: String) {
|
||||
applyNonAbiChange.add(pathToClassFile)
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
|
||||
index 7f5e780430..087552bfa0 100644
|
||||
--- a/buildSrc/build.gradle.kts
|
||||
+++ b/buildSrc/build.gradle.kts
|
||||
@@ -3,12 +3,13 @@ plugins {
|
||||
}
|
||||
|
||||
repositories {
|
||||
+ mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
- implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
|
||||
+ implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:<kotlin_version>")
|
||||
implementation("de.marcphilipp.gradle:nexus-publish-plugin:0.4.0")
|
||||
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.6.20")
|
||||
implementation(gradleApi())
|
||||
diff --git a/buildSrc/src/main/kotlin/Shared.kt b/buildSrc/src/main/kotlin/Shared.kt
|
||||
index e8a1ac553c..f3a1a1eb94 100644
|
||||
--- a/buildSrc/src/main/kotlin/Shared.kt
|
||||
+++ b/buildSrc/src/main/kotlin/Shared.kt
|
||||
@@ -15,9 +15,9 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsTargetDsl
|
||||
|
||||
fun Project.repositories() {
|
||||
repositories {
|
||||
+ mavenLocal()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
- mavenLocal()
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/gradle.properties b/gradle.properties
|
||||
index b6af7b9536..b4f3926cca 100644
|
||||
--- a/gradle.properties
|
||||
+++ b/gradle.properties
|
||||
@@ -1,7 +1,7 @@
|
||||
group=io.kvision
|
||||
versionNumber=5.9.0
|
||||
|
||||
-systemProp.kotlinVersion=1.6.21
|
||||
+systemProp.kotlinVersion=<kotlin_version>
|
||||
javaVersion=1.8
|
||||
coroutinesVersion=1.6.1
|
||||
serializationVersion=1.3.2
|
||||
diff --git a/settings.gradle.kts b/settings.gradle.kts
|
||||
index 6db44e6175..b941ae4a24 100644
|
||||
--- a/settings.gradle.kts
|
||||
+++ b/settings.gradle.kts
|
||||
@@ -1,8 +1,8 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
+ mavenLocal()
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
- mavenLocal()
|
||||
}
|
||||
}
|
||||
rootProject.name = "kvision"
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2010-2022 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.
|
||||
*/
|
||||
|
||||
// Pure 'org.jetbrains.kotlin.js' project (without MPP)
|
||||
// - relatively big codebase
|
||||
// - usually updated to the latest Kotlin version
|
||||
@file:BenchmarkProject(
|
||||
name = "kvision",
|
||||
gitUrl = "https://github.com/rjaros/kvision.git",
|
||||
gitCommitSha = "9204d7be944a57bd6c09053bc16b5eeea1bccac5"
|
||||
)
|
||||
|
||||
import java.io.File
|
||||
|
||||
val currentReleasePatch = {
|
||||
"kvision-kotlin-current.patch" to File("benchmarkScripts/files/kvision-kotlin-current.patch")
|
||||
.readText()
|
||||
.run { replace("<kotlin_version>", currentKotlinVersion) }
|
||||
.byteInputStream()
|
||||
}
|
||||
|
||||
runAllBenchmarks(
|
||||
suite {
|
||||
// Disabled due to the possible error "No space left on device"
|
||||
// Kotlin/Js/Ir trashes /tmp directory with files that are not reused
|
||||
// Check https://youtrack.jetbrains.com/issue/KT-52176/Kotlin-JS-Ir-compilation-creates-build-files-in-system-temp-dire
|
||||
// scenario {
|
||||
// title = "Build Js IR clean build"
|
||||
//
|
||||
// runTasks("jsIrJar")
|
||||
// runCleanupTasks("clean")
|
||||
// }
|
||||
|
||||
scenario {
|
||||
title = "Build Js Legacy clean build"
|
||||
|
||||
runTasks("jsLegacyJar")
|
||||
runCleanupTasks("clean")
|
||||
}
|
||||
|
||||
scenario {
|
||||
title = "Build Js Legacy with ABI change in ObservableList"
|
||||
|
||||
runTasks("jsLegacyJar")
|
||||
applyAbiChangeTo("kvision-modules/kvision-state/src/main/kotlin/io/kvision/state/ObservableList.kt")
|
||||
}
|
||||
|
||||
scenario {
|
||||
title = "Build Js Legacy with non-ABI change in ObservableList"
|
||||
|
||||
runTasks("jsLegacyJar")
|
||||
applyNonAbiChangeTo("kvision-modules/kvision-state/src/main/kotlin/io/kvision/state/ObservableList.kt")
|
||||
}
|
||||
},
|
||||
mapOf(
|
||||
"1.6.20" to null,
|
||||
"1.7.0" to currentReleasePatch
|
||||
)
|
||||
)
|
||||
@@ -137,3 +137,9 @@ addBenchmarkTask(
|
||||
script = "graphql-kotlin.benchmark.kts",
|
||||
JavaLanguageVersion.of(11)
|
||||
)
|
||||
|
||||
addBenchmarkTask(
|
||||
taskName = "benchmarkRegressionKvision",
|
||||
script = "kvision.benchmark.kts",
|
||||
JavaLanguageVersion.of(11)
|
||||
)
|
||||
Reference in New Issue
Block a user