Run benchmarks in the same suite

This should reduce variation in results, especially when overall time is
 quite low.
This commit is contained in:
Yahor Berdnikau
2023-01-26 19:02:29 +01:00
committed by Space Team
parent ace1bc76a1
commit 3f4c824a23
6 changed files with 111 additions and 107 deletions
@@ -9,24 +9,21 @@
@file:BenchmarkProject(
name = "graphql-kotlin",
gitUrl = "https://github.com/ExpediaGroup/graphql-kotlin.git",
gitCommitSha = "fd1e9063f3aae144e099cdcfa69a4416fa434fb2"
gitCommitSha = "fd1e9063f3aae144e099cdcfa69a4416fa434fb2",
stableKotlinVersion = "1.7.20",
)
import java.io.File
val stableReleasePatch = {
"graphql-kotlin-1.7.20.patch" to File("benchmarkScripts/files/graphql-kotlin-1.7.20.patch")
.readText()
.byteInputStream()
}
val currentReleasePatch = {
"graphql-kotlin-current.patch" to File("benchmarkScripts/files/graphql-kotlin-current.patch")
val repoPatch = {
"graphql-kotlin-current.patch" to File("benchmarkScripts/files/graphql-kotlin-repo.patch")
.readText()
.run { replace("<kotlin_version>", currentKotlinVersion) }
.byteInputStream()
}
runAllBenchmarks(
runBenchmarks(
repoPatch,
suite {
scenario {
title = "Spring server clean build"
@@ -91,9 +88,5 @@ runAllBenchmarks(
iterations = 20
runTasks("assemble")
}
},
mapOf(
"1.7.20" to stableReleasePatch,
"1.8.0" to currentReleasePatch
)
}
)