Rewriting infrastructure to get right measurement of GC work (#3147)

This commit is contained in:
LepilkinaElena
2019-07-08 12:23:30 +03:00
committed by GitHub
parent 712c056a54
commit 1e8eb1d4a8
17 changed files with 1390 additions and 1352 deletions
+2 -2
View File
@@ -235,7 +235,7 @@ With the `kotlin-platform-native` plugin interop with a native library can be de
components.main {
dependencies {
cinterop('mystdio') {
// Сinterop configuration.
// Cinterop configuration.
}
}
}
@@ -253,7 +253,7 @@ kotlin {
macosX64 {
compilations.main.cinterops {
mystdio {
// Сinterop configuration.
// Cinterop configuration.
}
}
}
@@ -15,6 +15,7 @@ import org.gradle.api.execution.TaskExecutionListener
import org.gradle.api.tasks.AbstractExecTask
import org.jetbrains.kotlin.gradle.plugin.KotlinTargetPreset
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink
import org.jetbrains.report.*
import org.jetbrains.report.json.*
import java.nio.file.Paths
@@ -151,12 +152,10 @@ fun sendUploadRequest(url: String, fileName: String, username: String? = null, p
fun createRunTask(
subproject: Project,
name: String,
runTask: AbstractExecTask<*>,
configureClosure: Closure<Any>? = null
linkTask: KotlinNativeLink,
outputFileName: String
): Task {
val task = subproject.tasks.create(name, RunKotlinNativeTask::class.java, runTask)
task.configure(configureClosure ?: task.emptyConfigureClosure())
return task
return subproject.tasks.create(name, RunKotlinNativeTask::class.java, linkTask, outputFileName)
}
@JvmOverloads
@@ -5,17 +5,17 @@
package org.jetbrains.kotlin
import groovy.lang.Closure
import org.gradle.api.DefaultTask
import org.gradle.api.Task
import org.gradle.api.tasks.AbstractExecTask
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.options.Option
import org.gradle.api.tasks.Input
import java.io.ByteArrayOutputStream
import java.io.File
import javax.inject.Inject
open class RunKotlinNativeTask @Inject constructor(
private val runTask: AbstractExecTask<*>
open class RunKotlinNativeTask @Inject constructor(private val linkTask: KotlinNativeLink,
private val outputFileName: String
) : DefaultTask() {
@Input
var buildType = "RELEASE"
@@ -26,30 +26,51 @@ open class RunKotlinNativeTask @Inject constructor(
@Option(option = "filterRegex", description = "Benchmarks to run, described by regular expressions (comma-separated)")
var filterRegex: String = ""
override fun configure(configureClosure: Closure<Any>): Task {
val task = super.configure(configureClosure)
this.finalizedBy(runTask.name)
runTask.finalizedBy("konanJsonReport")
return task
private val argumentsList = mutableListOf<String>()
init {
this.dependsOn += linkTask.name
this.finalizedBy("konanJsonReport")
}
fun depends(taskName: String) {
this.dependsOn += taskName
}
@TaskAction
fun run() {
runTask.run {
val filterArgs = filter.splitCommaSeparatedOption("-f")
val filterRegexArgs = filterRegex.splitCommaSeparatedOption("-fr")
runTask.args(filterArgs)
runTask.args(filterRegexArgs)
}
fun args(vararg arguments: String) {
argumentsList.addAll(arguments.toList())
}
internal fun emptyConfigureClosure() = object : Closure<Any>(this) {
override fun call(): RunKotlinNativeTask {
return this@RunKotlinNativeTask
@TaskAction
fun run() {
var output = ByteArrayOutputStream()
project.exec {
it.executable = linkTask.binary.outputFile.absolutePath
it.args("list")
it.standardOutput = output
}
val benchmarks = output.toString().lines()
val filterArgs = filter.splitCommaSeparatedOption("-f")
val filterRegexArgs = filterRegex.splitCommaSeparatedOption("-fr")
val regexes = filterRegexArgs.map { it.toRegex() }
val benchmarksToRun = if (filterArgs.isNotEmpty() || regexes.isNotEmpty()) {
benchmarks.filter { benchmark -> benchmark in filterArgs || regexes.any { it.matches(benchmark) } }
} else benchmarks.filter { !it.isEmpty() }
val results = benchmarksToRun.map { benchmark ->
output = ByteArrayOutputStream()
project.exec {
it.executable = linkTask.binary.outputFile.absolutePath
it.args(argumentsList)
it.args("-f", benchmark)
it.standardOutput = output
}
output.toString().removePrefix("[").removeSuffix("]")
}
File(outputFileName).printWriter().use { out ->
out.println("[${results.joinToString(",")}]")
}
}
}
@@ -134,17 +134,15 @@ open class BenchmarkingPlugin: Plugin<Project> {
linkerOpts.add("-L${mingwPath}/lib")
}
runTask!!.apply {
group = ""
enabled = false
}
// Specify settings configured by a user in the benchmark extension.
afterEvaluate {
linkerOpts.addAll(benchmark.linkerOpts)
runTask!!.args(
"-w", nativeWarmup,
"-r", attempts,
"-o", buildDir.resolve(nativeBenchResults).absolutePath,
"-p", "${benchmark.applicationName}::"
)
}
}
}
}
@@ -161,10 +159,18 @@ open class BenchmarkingPlugin: Plugin<Project> {
// Native run task.
val nativeTarget = kotlin.targets.getByName(NATIVE_TARGET_NAME) as KotlinNativeTarget
val nativeExecutable = nativeTarget.binaries.getExecutable(NATIVE_EXECUTABLE_NAME, NativeBuildType.RELEASE)
val konanRun = createRunTask(this, "konanRun", nativeExecutable.runTask!!).apply {
val konanRun = createRunTask(this, "konanRun", nativeExecutable.linkTask,
buildDir.resolve(nativeBenchResults).absolutePath).apply {
group = BENCHMARKING_GROUP
description = "Runs the benchmark for Kotlin/Native."
}
afterEvaluate {
(konanRun as RunKotlinNativeTask).args(
"-w", nativeWarmup.toString(),
"-r", attempts.toString(),
"-p", "${benchmark.applicationName}::"
)
}
// JVM run task.
val jvmRun = tasks.create("jvmRun", RunJvmTask::class.java) { task ->
+2 -2
View File
@@ -138,9 +138,9 @@ task teamCityStat(type:Exec) {
}
}
task сinterop {
task cinterop {
dependsOn 'clean'
dependsOn 'сinterop:konanRun'
dependsOn 'cinterop:konanRun'
}
task framework {
+14 -17
View File
@@ -21,29 +21,26 @@ import org.jetbrains.structsBenchmarks.*
import org.jetbrains.typesBenchmarks.*
import org.jetbrains.kliopt.*
class CinteropLauncher(numWarmIterations: Int, numberOfAttempts: Int, prefix: String) : Launcher(numWarmIterations, numberOfAttempts, prefix) {
val stringBenchmark = StringBenchmark()
val intMatrixBenchmark = IntMatrixBenchmark()
val intBenchmark = IntBenchmark()
val boxedIntBenchmark = BoxedIntBenchmark()
class CinteropLauncher : Launcher() {
override val benchmarks = BenchmarksCollection(
mutableMapOf(
"macros" to ::macrosBenchmark,
"struct" to ::structBenchmark,
"union" to ::unionBenchmark,
"enum" to ::enumBenchmark,
"stringToC" to stringBenchmark::stringToCBenchmark,
"stringToKotlin" to stringBenchmark::stringToKotlinBenchmark,
"intMatrix" to intMatrixBenchmark::intMatrixBenchmark,
"int" to intBenchmark::intBenchmark,
"boxedInt" to boxedIntBenchmark::boxedIntBenchmark
"macros" to BenchmarkEntry(::macrosBenchmark),
"struct" to BenchmarkEntry(::structBenchmark),
"union" to BenchmarkEntry(::unionBenchmark),
"enum" to BenchmarkEntry(::enumBenchmark),
"stringToC" to BenchmarkEntryWithInit.create(::StringBenchmark, { stringToCBenchmark() }),
"stringToKotlin" to BenchmarkEntryWithInit.create(::StringBenchmark, { stringToKotlinBenchmark() }),
"intMatrix" to BenchmarkEntryWithInit.create(::IntMatrixBenchmark, { intMatrixBenchmark() }),
"int" to BenchmarkEntryWithInit.create(::IntBenchmark, { intBenchmark() }),
"boxedInt" to BenchmarkEntryWithInit.create(::BoxedIntBenchmark, { boxedIntBenchmark() })
)
)
}
fun main(args: Array<String>) {
val launcher = CinteropLauncher()
BenchmarksRunner.runBenchmarks(args, { parser: ArgParser ->
CinteropLauncher(parser.get<Int>("warmup")!!, parser.get<Int>("repeat")!!, parser.get<String>("prefix")!!)
.launch(parser.getAll<String>("filter"), parser.getAll<String>("filterRegex"))
})
launcher.launch(parser.get<Int>("warmup")!!, parser.get<Int>("repeat")!!, parser.get<String>("prefix")!!,
parser.getAll<String>("filter"), parser.getAll<String>("filterRegex"))
}, benchmarksListAction = launcher::benchmarksListAction)
}
@@ -110,9 +110,9 @@ actual class ComplexNumbersBenchmark actual constructor() {
for (j in 0 until length/2) {
val first = sequence[i + j]
val second = sequence[i + j + length/2].mul(value)
sequence[i + j] = (first.add(second) as Complex)!!
sequence[i + j + length/2] = (first.sub(second) as Complex)!!
value = value.mul(base)!!
sequence[i + j] = first.add(second) as Complex
sequence[i + j + length/2] = first.sub(second) as Complex
value = value.mul(base)
}
}
length = length shl 1
@@ -128,7 +128,7 @@ actual class ComplexNumbersBenchmark actual constructor() {
val sequence = fftRoutine(true)
sequence.forEachIndexed { index, number ->
sequence[index] = number.div(Complex(sequence.size.toDouble(), 0.0)) ?: Complex(0.0, 0.0)
sequence[index] = number.div(Complex(sequence.size.toDouble(), 0.0))
}
}
}
+14 -13
View File
@@ -8,25 +8,26 @@ import org.jetbrains.benchmarksLauncher.*
import org.jetbrains.complexNumbers.*
import org.jetbrains.kliopt.*
class ObjCInteropLauncher(numWarmIterations: Int, numberOfAttempts: Int, prefix: String): Launcher(numWarmIterations, numberOfAttempts, prefix) {
val complexNumbersBecnhmark = ComplexNumbersBenchmark()
class ObjCInteropLauncher: Launcher() {
override val benchmarks = BenchmarksCollection(
mutableMapOf(
"generateNumbersSequence" to complexNumbersBecnhmark::generateNumbersSequence,
"sumComplex" to complexNumbersBecnhmark::sumComplex,
"subComplex" to complexNumbersBecnhmark::subComplex,
"classInheritance" to complexNumbersBecnhmark::classInheritance,
"categoryMethods" to complexNumbersBecnhmark::categoryMethods,
"stringToObjC" to complexNumbersBecnhmark::stringToObjC,
"stringFromObjC" to complexNumbersBecnhmark::stringFromObjC,
"fft" to complexNumbersBecnhmark::fft,
"invertFft" to complexNumbersBecnhmark::invertFft
"generateNumbersSequence" to BenchmarkEntryWithInit.create(::ComplexNumbersBenchmark, { generateNumbersSequence() }),
"sumComplex" to BenchmarkEntryWithInit.create(::ComplexNumbersBenchmark, { sumComplex() }),
"subComplex" to BenchmarkEntryWithInit.create(::ComplexNumbersBenchmark, { subComplex() }),
"classInheritance" to BenchmarkEntryWithInit.create(::ComplexNumbersBenchmark, { classInheritance() }),
"categoryMethods" to BenchmarkEntryWithInit.create(::ComplexNumbersBenchmark, { categoryMethods() }),
"stringToObjC" to BenchmarkEntryWithInit.create(::ComplexNumbersBenchmark, { stringToObjC() }),
"stringFromObjC" to BenchmarkEntryWithInit.create(::ComplexNumbersBenchmark, { stringFromObjC() }),
"fft" to BenchmarkEntryWithInit.create(::ComplexNumbersBenchmark, { fft() }),
"invertFft" to BenchmarkEntryWithInit.create(::ComplexNumbersBenchmark, { invertFft() })
)
)
}
fun main(args: Array<String>) {
val launcher = ObjCInteropLauncher()
BenchmarksRunner.runBenchmarks(args, { parser: ArgParser ->
ObjCInteropLauncher(parser.get<Int>("warmup")!!, parser.get<Int>("repeat")!!, parser.get<String>("prefix")!!).launch(parser.getAll<String>("filter"))
})
launcher.launch(parser.get<Int>("warmup")!!, parser.get<Int>("repeat")!!, parser.get<String>("prefix")!!,
parser.getAll<String>("filter"), parser.getAll<String>("filterRegex"))
}, benchmarksListAction = launcher::benchmarksListAction)
}
+184 -210
View File
@@ -20,223 +20,197 @@ import octoTest
import org.jetbrains.benchmarksLauncher.*
import org.jetbrains.kliopt.*
class RingLauncher(numWarmIterations: Int, numberOfAttempts: Int, prefix: String) : Launcher(numWarmIterations, numberOfAttempts, prefix) {
val abstractMethodBenchmark = AbstractMethodBenchmark()
val classArrayBenchmark = ClassArrayBenchmark()
val classBaselineBenchmark = ClassBaselineBenchmark()
val classListBenchmark = ClassListBenchmark()
val classStreamBenchmark = ClassStreamBenchmark()
val companionObjectBenchmark = CompanionObjectBenchmark()
val defaultArgumentBenchmark = DefaultArgumentBenchmark()
val elvisBenchmark = ElvisBenchmark()
val eulerBenchmark = EulerBenchmark()
val fibonacciBenchmark = FibonacciBenchmark()
val forLoopsBenchmark = ForLoopsBenchmark()
val inlineBenchmark = InlineBenchmark()
val intArrayBenchmark = IntArrayBenchmark()
val intBaselineBenchmark = IntBaselineBenchmark()
val intListBenchmark = IntListBenchmark()
val intStreamBenchmark = IntStreamBenchmark()
val lambdaBenchmark = LambdaBenchmark()
val loopBenchmark = LoopBenchmark()
val matrixMapBenchmark = MatrixMapBenchmark()
val parameterNotNullAssertionBenchmark = ParameterNotNullAssertionBenchmark()
val primeListBenchmark = PrimeListBenchmark()
val stringBenchmark = StringBenchmark()
val switchBenchmark = SwitchBenchmark()
val withIndiciesBenchmark = WithIndiciesBenchmark()
val callsBenchmark = CallsBenchmark()
val coordinatesSolverBenchmark = CoordinatesSolverBenchmark()
val graphSolverBenchmark = GraphSolverBenchmark()
class RingLauncher : Launcher() {
override val benchmarks = BenchmarksCollection(
mutableMapOf(
"AbstractMethod.sortStrings" to abstractMethodBenchmark::sortStrings,
"AbstractMethod.sortStringsWithComparator" to abstractMethodBenchmark::sortStringsWithComparator,
"ClassArray.copy" to classArrayBenchmark::copy,
"ClassArray.copyManual" to classArrayBenchmark::copyManual,
"ClassArray.filterAndCount" to classArrayBenchmark::filterAndCount,
"ClassArray.filterAndMap" to classArrayBenchmark::filterAndMap,
"ClassArray.filterAndMapManual" to classArrayBenchmark::filterAndMapManual,
"ClassArray.filter" to classArrayBenchmark::filter,
"ClassArray.filterManual" to classArrayBenchmark::filterManual,
"ClassArray.countFilteredManual" to classArrayBenchmark::countFilteredManual,
"ClassArray.countFiltered" to classArrayBenchmark::countFiltered,
"ClassArray.countFilteredLocal" to classArrayBenchmark::countFilteredLocal,
"ClassBaseline.consume" to classBaselineBenchmark::consume,
"ClassBaseline.consumeField" to classBaselineBenchmark::consumeField,
"ClassBaseline.allocateList" to classBaselineBenchmark::allocateList,
"ClassBaseline.allocateArray" to classBaselineBenchmark::allocateArray,
"ClassBaseline.allocateListAndFill" to classBaselineBenchmark::allocateListAndFill,
"ClassBaseline.allocateListAndWrite" to classBaselineBenchmark::allocateListAndWrite,
"ClassBaseline.allocateArrayAndFill" to classBaselineBenchmark::allocateArrayAndFill,
"ClassList.copy" to classListBenchmark::copy,
"ClassList.copyManual" to classListBenchmark::copyManual,
"ClassList.filterAndCount" to classListBenchmark::filterAndCount,
"ClassList.filterAndCountWithLambda" to classListBenchmark::filterAndCountWithLambda,
"ClassList.filterWithLambda" to classListBenchmark::filterWithLambda,
"ClassList.mapWithLambda" to classListBenchmark::mapWithLambda,
"ClassList.countWithLambda" to classListBenchmark::countWithLambda,
"ClassList.filterAndMapWithLambda" to classListBenchmark::filterAndMapWithLambda,
"ClassList.filterAndMapWithLambdaAsSequence" to classListBenchmark::filterAndMapWithLambdaAsSequence,
"ClassList.filterAndMap" to classListBenchmark::filterAndMap,
"ClassList.filterAndMapManual" to classListBenchmark::filterAndMapManual,
"ClassList.filter" to classListBenchmark::filter,
"ClassList.filterManual" to classListBenchmark::filterManual,
"ClassList.countFilteredManual" to classListBenchmark::countFilteredManual,
"ClassList.countFiltered" to classListBenchmark::countFiltered,
"ClassList.reduce" to classListBenchmark::reduce,
"ClassStream.copy" to classStreamBenchmark::copy,
"ClassStream.copyManual" to classStreamBenchmark::copyManual,
"ClassStream.filterAndCount" to classStreamBenchmark::filterAndCount,
"ClassStream.filterAndMap" to classStreamBenchmark::filterAndMap,
"ClassStream.filterAndMapManual" to classStreamBenchmark::filterAndMapManual,
"ClassStream.filter" to classStreamBenchmark::filter,
"ClassStream.filterManual" to classStreamBenchmark::filterManual,
"ClassStream.countFilteredManual" to classStreamBenchmark::countFilteredManual,
"ClassStream.countFiltered" to classStreamBenchmark::countFiltered,
"ClassStream.reduce" to classStreamBenchmark::reduce,
"CompanionObject.invokeRegularFunction" to companionObjectBenchmark::invokeRegularFunction,
"CompanionObject.invokeJvmStaticFunction" to companionObjectBenchmark::invokeJvmStaticFunction,
"DefaultArgument.testOneOfTwo" to defaultArgumentBenchmark::testOneOfTwo,
"DefaultArgument.testTwoOfTwo" to defaultArgumentBenchmark::testTwoOfTwo,
"DefaultArgument.testOneOfFour" to defaultArgumentBenchmark::testOneOfFour,
"DefaultArgument.testFourOfFour" to defaultArgumentBenchmark::testFourOfFour,
"DefaultArgument.testOneOfEight" to defaultArgumentBenchmark::testOneOfEight,
"DefaultArgument.testEightOfEight" to defaultArgumentBenchmark::testEightOfEight,
"Elvis.testElvis" to elvisBenchmark::testElvis,
"Euler.problem1bySequence" to eulerBenchmark::problem1bySequence,
"Euler.problem1" to eulerBenchmark::problem1,
"Euler.problem2" to eulerBenchmark::problem2,
"Euler.problem4" to eulerBenchmark::problem4,
"Euler.problem8" to eulerBenchmark::problem8,
"Euler.problem9" to eulerBenchmark::problem9,
"Euler.problem14" to eulerBenchmark::problem14,
"Euler.problem14full" to eulerBenchmark::problem14full,
"Fibonacci.calcClassic" to fibonacciBenchmark::calcClassic,
"Fibonacci.calc" to fibonacciBenchmark::calc,
"Fibonacci.calcWithProgression" to fibonacciBenchmark::calcWithProgression,
"Fibonacci.calcSquare" to fibonacciBenchmark::calcSquare,
"ForLoops.arrayLoop" to forLoopsBenchmark::arrayLoop,
"ForLoops.intArrayLoop" to forLoopsBenchmark::intArrayLoop,
"ForLoops.floatArrayLoop" to forLoopsBenchmark::floatArrayLoop,
"ForLoops.charArrayLoop" to forLoopsBenchmark::charArrayLoop,
"ForLoops.stringLoop" to forLoopsBenchmark::stringLoop,
"ForLoops.arrayIndicesLoop" to forLoopsBenchmark::arrayIndicesLoop,
"ForLoops.intArrayIndicesLoop" to forLoopsBenchmark::intArrayIndicesLoop,
"ForLoops.floatArrayIndicesLoop" to forLoopsBenchmark::floatArrayIndicesLoop,
"ForLoops.charArrayIndicesLoop" to forLoopsBenchmark::charArrayIndicesLoop,
"ForLoops.stringIndicesLoop" to forLoopsBenchmark::stringIndicesLoop,
"Inline.calculate" to inlineBenchmark::calculate,
"Inline.calculateInline" to inlineBenchmark::calculateInline,
"Inline.calculateGeneric" to inlineBenchmark::calculateGeneric,
"Inline.calculateGenericInline" to inlineBenchmark::calculateGenericInline,
"IntArray.copy" to intArrayBenchmark::copy,
"IntArray.copyManual" to intArrayBenchmark::copyManual,
"IntArray.filterAndCount" to intArrayBenchmark::filterAndCount,
"IntArray.filterSomeAndCount" to intArrayBenchmark::filterSomeAndCount,
"IntArray.filterAndMap" to intArrayBenchmark::filterAndMap,
"IntArray.filterAndMapManual" to intArrayBenchmark::filterAndMapManual,
"IntArray.filter" to intArrayBenchmark::filter,
"IntArray.filterSome" to intArrayBenchmark::filterSome,
"IntArray.filterPrime" to intArrayBenchmark::filterPrime,
"IntArray.filterManual" to intArrayBenchmark::filterManual,
"IntArray.filterSomeManual" to intArrayBenchmark::filterSomeManual,
"IntArray.countFilteredManual" to intArrayBenchmark::countFilteredManual,
"IntArray.countFilteredSomeManual" to intArrayBenchmark::countFilteredSomeManual,
"IntArray.countFilteredPrimeManual" to intArrayBenchmark::countFilteredPrimeManual,
"IntArray.countFiltered" to intArrayBenchmark::countFiltered,
"IntArray.countFilteredSome" to intArrayBenchmark::countFilteredSome,
"IntArray.countFilteredPrime" to intArrayBenchmark::countFilteredPrime,
"IntArray.countFilteredLocal" to intArrayBenchmark::countFilteredLocal,
"IntArray.countFilteredSomeLocal" to intArrayBenchmark::countFilteredSomeLocal,
"IntArray.reduce" to intArrayBenchmark::reduce,
"IntBaseline.consume" to intBaselineBenchmark::consume,
"IntBaseline.allocateList" to intBaselineBenchmark::allocateList,
"IntBaseline.allocateArray" to intBaselineBenchmark::allocateArray,
"IntBaseline.allocateListAndFill" to intBaselineBenchmark::allocateListAndFill,
"IntBaseline.allocateArrayAndFill" to intBaselineBenchmark::allocateArrayAndFill,
"IntList.copy" to intListBenchmark::copy,
"IntList.copyManual" to intListBenchmark::copyManual,
"IntList.filterAndCount" to intListBenchmark::filterAndCount,
"IntList.filterAndMap" to intListBenchmark::filterAndMap,
"IntList.filterAndMapManual" to intListBenchmark::filterAndMapManual,
"IntList.filter" to intListBenchmark::filter,
"IntList.filterManual" to intListBenchmark::filterManual,
"IntList.countFilteredManual" to intListBenchmark::countFilteredManual,
"IntList.countFiltered" to intListBenchmark::countFiltered,
"IntList.countFilteredLocal" to intListBenchmark::countFilteredLocal,
"IntList.reduce" to intListBenchmark::reduce,
"IntStream.copy" to intStreamBenchmark::copy,
"IntStream.copyManual" to intStreamBenchmark::copyManual,
"IntStream.filterAndCount" to intStreamBenchmark::filterAndCount,
"IntStream.filterAndMap" to intStreamBenchmark::filterAndMap,
"IntStream.filterAndMapManual" to intStreamBenchmark::filterAndMapManual,
"IntStream.filter" to intStreamBenchmark::filter,
"IntStream.filterManual" to intStreamBenchmark::filterManual,
"IntStream.countFilteredManual" to intStreamBenchmark::countFilteredManual,
"IntStream.countFiltered" to intStreamBenchmark::countFiltered,
"IntStream.countFilteredLocal" to intStreamBenchmark::countFilteredLocal,
"IntStream.reduce" to intStreamBenchmark::reduce,
"Lambda.noncapturingLambda" to lambdaBenchmark::noncapturingLambda,
"Lambda.noncapturingLambdaNoInline" to lambdaBenchmark::noncapturingLambdaNoInline,
"Lambda.capturingLambda" to lambdaBenchmark::capturingLambda,
"Lambda.capturingLambdaNoInline" to lambdaBenchmark::capturingLambdaNoInline,
"Lambda.mutatingLambda" to lambdaBenchmark::mutatingLambda,
"Lambda.mutatingLambdaNoInline" to lambdaBenchmark::mutatingLambdaNoInline,
"Lambda.methodReference" to lambdaBenchmark::methodReference,
"Lambda.methodReferenceNoInline" to lambdaBenchmark::methodReferenceNoInline,
"Loop.arrayLoop" to loopBenchmark::arrayLoop,
"Loop.arrayIndexLoop" to loopBenchmark::arrayIndexLoop,
"Loop.rangeLoop" to loopBenchmark::rangeLoop,
"Loop.arrayListLoop" to loopBenchmark::arrayListLoop,
"Loop.arrayWhileLoop" to loopBenchmark::arrayWhileLoop,
"Loop.arrayForeachLoop" to loopBenchmark::arrayForeachLoop,
"Loop.arrayListForeachLoop" to loopBenchmark::arrayListForeachLoop,
"MatrixMap.add" to matrixMapBenchmark::add,
"ParameterNotNull.invokeOneArgWithNullCheck" to parameterNotNullAssertionBenchmark::invokeOneArgWithNullCheck,
"ParameterNotNull.invokeOneArgWithoutNullCheck" to parameterNotNullAssertionBenchmark::invokeOneArgWithoutNullCheck,
"ParameterNotNull.invokeTwoArgsWithNullCheck" to parameterNotNullAssertionBenchmark::invokeTwoArgsWithNullCheck,
"ParameterNotNull.invokeTwoArgsWithoutNullCheck" to parameterNotNullAssertionBenchmark::invokeTwoArgsWithoutNullCheck,
"ParameterNotNull.invokeEightArgsWithNullCheck" to parameterNotNullAssertionBenchmark::invokeEightArgsWithNullCheck,
"ParameterNotNull.invokeEightArgsWithoutNullCheck" to parameterNotNullAssertionBenchmark::invokeEightArgsWithoutNullCheck,
"PrimeList.calcDirect" to primeListBenchmark::calcDirect,
"PrimeList.calcEratosthenes" to primeListBenchmark::calcEratosthenes,
"String.stringConcat" to stringBenchmark::stringConcat,
"String.stringConcatNullable" to stringBenchmark::stringConcatNullable,
"String.stringBuilderConcat" to stringBenchmark::stringBuilderConcat,
"String.stringBuilderConcatNullable" to stringBenchmark::stringBuilderConcatNullable,
"String.summarizeSplittedCsv" to stringBenchmark::summarizeSplittedCsv,
"Switch.testSparseIntSwitch" to switchBenchmark::testSparseIntSwitch,
"Switch.testDenseIntSwitch" to switchBenchmark::testDenseIntSwitch,
"Switch.testConstSwitch" to switchBenchmark::testConstSwitch,
"Switch.testObjConstSwitch" to switchBenchmark::testObjConstSwitch,
"Switch.testVarSwitch" to switchBenchmark::testVarSwitch,
"Switch.testStringsSwitch" to switchBenchmark::testStringsSwitch,
"Switch.testEnumsSwitch" to switchBenchmark::testEnumsSwitch,
"Switch.testDenseEnumsSwitch" to switchBenchmark::testDenseEnumsSwitch,
"Switch.testSealedWhenSwitch" to switchBenchmark::testSealedWhenSwitch,
"WithIndicies.withIndicies" to withIndiciesBenchmark::withIndicies,
"WithIndicies.withIndiciesManual" to withIndiciesBenchmark::withIndiciesManual,
"OctoTest" to ::octoTest,
"Calls.finalMethod" to callsBenchmark::finalMethodCall,
"Calls.openMethodMonomorphic" to callsBenchmark::classOpenMethodCall_MonomorphicCallsite,
"Calls.openMethodBimorphic" to callsBenchmark::classOpenMethodCall_BimorphicCallsite,
"Calls.openMethodTrimorphic" to callsBenchmark::classOpenMethodCall_TrimorphicCallsite,
"Calls.interfaceMethodMonomorphic" to callsBenchmark::interfaceMethodCall_MonomorphicCallsite,
"Calls.interfaceMethodBimorphic" to callsBenchmark::interfaceMethodCall_BimorphicCallsite,
"Calls.interfaceMethodTrimorphic" to callsBenchmark::interfaceMethodCall_TrimorphicCallsite,
"Calls.returnBoxUnboxFolding" to callsBenchmark::returnBoxUnboxFolding,
"Calls.parameterBoxUnboxFolding" to callsBenchmark::parameterBoxUnboxFolding,
"CoordinatesSolver.solve" to coordinatesSolverBenchmark::solve,
"GraphSolver.solve" to graphSolverBenchmark::solve
"AbstractMethod.sortStrings" to BenchmarkEntryWithInit.create(::AbstractMethodBenchmark, { sortStrings() }),
"AbstractMethod.sortStringsWithComparator" to BenchmarkEntryWithInit.create(::AbstractMethodBenchmark, { sortStringsWithComparator() }),
"ClassArray.copy" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { copy() }),
"ClassArray.copyManual" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { copyManual() }),
"ClassArray.filterAndCount" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { filterAndCount() }),
"ClassArray.filterAndMap" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { filterAndMap() }),
"ClassArray.filterAndMapManual" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { filterAndMapManual() }),
"ClassArray.filter" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { filter() }),
"ClassArray.filterManual" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { filterManual() }),
"ClassArray.countFilteredManual" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { countFilteredManual() }),
"ClassArray.countFiltered" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { countFiltered() }),
"ClassArray.countFilteredLocal" to BenchmarkEntryWithInit.create(::ClassArrayBenchmark, { countFilteredLocal() }),
"ClassBaseline.consume" to BenchmarkEntryWithInit.create(::ClassBaselineBenchmark, { consume() }),
"ClassBaseline.consumeField" to BenchmarkEntryWithInit.create(::ClassBaselineBenchmark, { consumeField() }),
"ClassBaseline.allocateList" to BenchmarkEntryWithInit.create(::ClassBaselineBenchmark, { allocateList() }),
"ClassBaseline.allocateArray" to BenchmarkEntryWithInit.create(::ClassBaselineBenchmark, { allocateArray() }),
"ClassBaseline.allocateListAndFill" to BenchmarkEntryWithInit.create(::ClassBaselineBenchmark, { allocateListAndFill() }),
"ClassBaseline.allocateListAndWrite" to BenchmarkEntryWithInit.create(::ClassBaselineBenchmark, { allocateListAndWrite() }),
"ClassBaseline.allocateArrayAndFill" to BenchmarkEntryWithInit.create(::ClassBaselineBenchmark, { allocateArrayAndFill() }),
"ClassList.copy" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { copy() }),
"ClassList.copyManual" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { copyManual() }),
"ClassList.filterAndCount" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { filterAndCount() }),
"ClassList.filterAndCountWithLambda" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { filterAndCountWithLambda() }),
"ClassList.filterWithLambda" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { filterWithLambda() }),
"ClassList.mapWithLambda" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { mapWithLambda() }),
"ClassList.countWithLambda" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { countWithLambda() }),
"ClassList.filterAndMapWithLambda" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { filterAndMapWithLambda() }),
"ClassList.filterAndMapWithLambdaAsSequence" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { filterAndMapWithLambdaAsSequence() }),
"ClassList.filterAndMap" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { filterAndMap() }),
"ClassList.filterAndMapManual" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { filterAndMapManual() }),
"ClassList.filter" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { filter() }),
"ClassList.filterManual" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { filterManual() }),
"ClassList.countFilteredManual" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { countFilteredManual() }),
"ClassList.countFiltered" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { countFiltered() }),
"ClassList.reduce" to BenchmarkEntryWithInit.create(::ClassListBenchmark, { reduce() }),
"ClassStream.copy" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { copy() }),
"ClassStream.copyManual" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { copyManual() }),
"ClassStream.filterAndCount" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { filterAndCount() }),
"ClassStream.filterAndMap" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { filterAndMap() }),
"ClassStream.filterAndMapManual" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { filterAndMapManual() }),
"ClassStream.filter" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { filter() }),
"ClassStream.filterManual" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { filterManual() }),
"ClassStream.countFilteredManual" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { countFilteredManual() }),
"ClassStream.countFiltered" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { countFiltered() }),
"ClassStream.reduce" to BenchmarkEntryWithInit.create(::ClassStreamBenchmark, { reduce() }),
"CompanionObject.invokeRegularFunction" to BenchmarkEntryWithInit.create(::CompanionObjectBenchmark, { invokeRegularFunction() }),
"CompanionObject.invokeJvmStaticFunction" to BenchmarkEntryWithInit.create(::CompanionObjectBenchmark, { invokeJvmStaticFunction() }),
"DefaultArgument.testOneOfTwo" to BenchmarkEntryWithInit.create(::DefaultArgumentBenchmark, { testOneOfTwo() }),
"DefaultArgument.testTwoOfTwo" to BenchmarkEntryWithInit.create(::DefaultArgumentBenchmark, { testTwoOfTwo() }),
"DefaultArgument.testOneOfFour" to BenchmarkEntryWithInit.create(::DefaultArgumentBenchmark, { testOneOfFour() }),
"DefaultArgument.testFourOfFour" to BenchmarkEntryWithInit.create(::DefaultArgumentBenchmark, { testFourOfFour() }),
"DefaultArgument.testOneOfEight" to BenchmarkEntryWithInit.create(::DefaultArgumentBenchmark, { testOneOfEight() }),
"DefaultArgument.testEightOfEight" to BenchmarkEntryWithInit.create(::DefaultArgumentBenchmark, { testEightOfEight() }),
"Elvis.testElvis" to BenchmarkEntryWithInit.create(::ElvisBenchmark, { testElvis() }),
"Euler.problem1bySequence" to BenchmarkEntryWithInit.create(::EulerBenchmark, { problem1bySequence() }),
"Euler.problem1" to BenchmarkEntryWithInit.create(::EulerBenchmark, { problem1() }),
"Euler.problem2" to BenchmarkEntryWithInit.create(::EulerBenchmark, { problem2() }),
"Euler.problem4" to BenchmarkEntryWithInit.create(::EulerBenchmark, { problem4() }),
"Euler.problem8" to BenchmarkEntryWithInit.create(::EulerBenchmark, { problem8() }),
"Euler.problem9" to BenchmarkEntryWithInit.create(::EulerBenchmark, { problem9() }),
"Euler.problem14" to BenchmarkEntryWithInit.create(::EulerBenchmark, { problem14() }),
"Euler.problem14full" to BenchmarkEntryWithInit.create(::EulerBenchmark, { problem14full() }),
"Fibonacci.calcClassic" to BenchmarkEntryWithInit.create(::FibonacciBenchmark, { calcClassic() }),
"Fibonacci.calc" to BenchmarkEntryWithInit.create(::FibonacciBenchmark, { calc() }),
"Fibonacci.calcWithProgression" to BenchmarkEntryWithInit.create(::FibonacciBenchmark, { calcWithProgression() }),
"Fibonacci.calcSquare" to BenchmarkEntryWithInit.create(::FibonacciBenchmark, { calcSquare() }),
"ForLoops.arrayLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { arrayLoop() }),
"ForLoops.intArrayLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { intArrayLoop() }),
"ForLoops.floatArrayLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { floatArrayLoop() }),
"ForLoops.charArrayLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { charArrayLoop() }),
"ForLoops.stringLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { stringLoop() }),
"ForLoops.arrayIndicesLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { arrayIndicesLoop() }),
"ForLoops.intArrayIndicesLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { intArrayIndicesLoop() }),
"ForLoops.floatArrayIndicesLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { floatArrayIndicesLoop() }),
"ForLoops.charArrayIndicesLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { charArrayIndicesLoop() }),
"ForLoops.stringIndicesLoop" to BenchmarkEntryWithInit.create(::ForLoopsBenchmark, { stringIndicesLoop() }),
"Inline.calculate" to BenchmarkEntryWithInit.create(::InlineBenchmark, { calculate() }),
"Inline.calculateInline" to BenchmarkEntryWithInit.create(::InlineBenchmark, { calculateInline() }),
"Inline.calculateGeneric" to BenchmarkEntryWithInit.create(::InlineBenchmark, { calculateGeneric() }),
"Inline.calculateGenericInline" to BenchmarkEntryWithInit.create(::InlineBenchmark, { calculateGenericInline() }),
"IntArray.copy" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { copy() }),
"IntArray.copyManual" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { copyManual() }),
"IntArray.filterAndCount" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { filterAndCount() }),
"IntArray.filterSomeAndCount" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { filterSomeAndCount() }),
"IntArray.filterAndMap" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { filterAndMap() }),
"IntArray.filterAndMapManual" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { filterAndMapManual() }),
"IntArray.filter" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { filter() }),
"IntArray.filterSome" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { filterSome() }),
"IntArray.filterPrime" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { filterPrime() }),
"IntArray.filterManual" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { filterManual() }),
"IntArray.filterSomeManual" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { filterSomeManual() }),
"IntArray.countFilteredManual" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { countFilteredManual() }),
"IntArray.countFilteredSomeManual" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { countFilteredSomeManual() }),
"IntArray.countFilteredPrimeManual" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { countFilteredPrimeManual() }),
"IntArray.countFiltered" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { countFiltered() }),
"IntArray.countFilteredSome" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { countFilteredSome() }),
"IntArray.countFilteredPrime" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { countFilteredPrime() }),
"IntArray.countFilteredLocal" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { countFilteredLocal() }),
"IntArray.countFilteredSomeLocal" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { countFilteredSomeLocal() }),
"IntArray.reduce" to BenchmarkEntryWithInit.create(::IntArrayBenchmark, { reduce() }),
"IntBaseline.consume" to BenchmarkEntryWithInit.create(::IntBaselineBenchmark, { consume() }),
"IntBaseline.allocateList" to BenchmarkEntryWithInit.create(::IntBaselineBenchmark, { allocateList() }),
"IntBaseline.allocateArray" to BenchmarkEntryWithInit.create(::IntBaselineBenchmark, { allocateArray() }),
"IntBaseline.allocateListAndFill" to BenchmarkEntryWithInit.create(::IntBaselineBenchmark, { allocateListAndFill() }),
"IntBaseline.allocateArrayAndFill" to BenchmarkEntryWithInit.create(::IntBaselineBenchmark, { allocateArrayAndFill() }),
"IntList.copy" to BenchmarkEntryWithInit.create(::IntListBenchmark, { copy() }),
"IntList.copyManual" to BenchmarkEntryWithInit.create(::IntListBenchmark, { copyManual() }),
"IntList.filterAndCount" to BenchmarkEntryWithInit.create(::IntListBenchmark, { filterAndCount() }),
"IntList.filterAndMap" to BenchmarkEntryWithInit.create(::IntListBenchmark, { filterAndMap() }),
"IntList.filterAndMapManual" to BenchmarkEntryWithInit.create(::IntListBenchmark, { filterAndMapManual() }),
"IntList.filter" to BenchmarkEntryWithInit.create(::IntListBenchmark, { filter() }),
"IntList.filterManual" to BenchmarkEntryWithInit.create(::IntListBenchmark, { filterManual() }),
"IntList.countFilteredManual" to BenchmarkEntryWithInit.create(::IntListBenchmark, { countFilteredManual() }),
"IntList.countFiltered" to BenchmarkEntryWithInit.create(::IntListBenchmark, { countFiltered() }),
"IntList.countFilteredLocal" to BenchmarkEntryWithInit.create(::IntListBenchmark, { countFilteredLocal() }),
"IntList.reduce" to BenchmarkEntryWithInit.create(::IntListBenchmark, { reduce() }),
"IntStream.copy" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { copy() }),
"IntStream.copyManual" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { copyManual() }),
"IntStream.filterAndCount" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { filterAndCount() }),
"IntStream.filterAndMap" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { filterAndMap() }),
"IntStream.filterAndMapManual" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { filterAndMapManual() }),
"IntStream.filter" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { filter() }),
"IntStream.filterManual" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { filterManual() }),
"IntStream.countFilteredManual" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { countFilteredManual() }),
"IntStream.countFiltered" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { countFiltered() }),
"IntStream.countFilteredLocal" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { countFilteredLocal() }),
"IntStream.reduce" to BenchmarkEntryWithInit.create(::IntStreamBenchmark, { reduce() }),
"Lambda.noncapturingLambda" to BenchmarkEntryWithInit.create(::LambdaBenchmark, { noncapturingLambda() }),
"Lambda.noncapturingLambdaNoInline" to BenchmarkEntryWithInit.create(::LambdaBenchmark, { noncapturingLambdaNoInline() }),
"Lambda.capturingLambda" to BenchmarkEntryWithInit.create(::LambdaBenchmark, { capturingLambda() }),
"Lambda.capturingLambdaNoInline" to BenchmarkEntryWithInit.create(::LambdaBenchmark, { capturingLambdaNoInline() }),
"Lambda.mutatingLambda" to BenchmarkEntryWithInit.create(::LambdaBenchmark, { mutatingLambda() }),
"Lambda.mutatingLambdaNoInline" to BenchmarkEntryWithInit.create(::LambdaBenchmark, { mutatingLambdaNoInline() }),
"Lambda.methodReference" to BenchmarkEntryWithInit.create(::LambdaBenchmark, { methodReference() }),
"Lambda.methodReferenceNoInline" to BenchmarkEntryWithInit.create(::LambdaBenchmark, { methodReferenceNoInline() }),
"Loop.arrayLoop" to BenchmarkEntryWithInit.create(::LoopBenchmark, { arrayLoop() }),
"Loop.arrayIndexLoop" to BenchmarkEntryWithInit.create(::LoopBenchmark, { arrayIndexLoop() }),
"Loop.rangeLoop" to BenchmarkEntryWithInit.create(::LoopBenchmark, { rangeLoop() }),
"Loop.arrayListLoop" to BenchmarkEntryWithInit.create(::LoopBenchmark, { arrayListLoop() }),
"Loop.arrayWhileLoop" to BenchmarkEntryWithInit.create(::LoopBenchmark, { arrayWhileLoop() }),
"Loop.arrayForeachLoop" to BenchmarkEntryWithInit.create(::LoopBenchmark, { arrayForeachLoop() }),
"Loop.arrayListForeachLoop" to BenchmarkEntryWithInit.create(::LoopBenchmark, { arrayListForeachLoop() }),
"MatrixMap.add" to BenchmarkEntryWithInit.create(::MatrixMapBenchmark, { add() }),
"ParameterNotNull.invokeOneArgWithNullCheck" to BenchmarkEntryWithInit.create(::ParameterNotNullAssertionBenchmark, { invokeOneArgWithNullCheck() }),
"ParameterNotNull.invokeOneArgWithoutNullCheck" to BenchmarkEntryWithInit.create(::ParameterNotNullAssertionBenchmark, { invokeOneArgWithoutNullCheck() }),
"ParameterNotNull.invokeTwoArgsWithNullCheck" to BenchmarkEntryWithInit.create(::ParameterNotNullAssertionBenchmark, { invokeTwoArgsWithNullCheck() }),
"ParameterNotNull.invokeTwoArgsWithoutNullCheck" to BenchmarkEntryWithInit.create(::ParameterNotNullAssertionBenchmark, { invokeTwoArgsWithoutNullCheck() }),
"ParameterNotNull.invokeEightArgsWithNullCheck" to BenchmarkEntryWithInit.create(::ParameterNotNullAssertionBenchmark, { invokeEightArgsWithNullCheck() }),
"ParameterNotNull.invokeEightArgsWithoutNullCheck" to BenchmarkEntryWithInit.create(::ParameterNotNullAssertionBenchmark, { invokeEightArgsWithoutNullCheck() }),
"PrimeList.calcDirect" to BenchmarkEntryWithInit.create(::PrimeListBenchmark, { calcDirect() }),
"PrimeList.calcEratosthenes" to BenchmarkEntryWithInit.create(::PrimeListBenchmark, { calcEratosthenes() }),
"String.stringConcat" to BenchmarkEntryWithInit.create(::StringBenchmark, { stringConcat() }),
"String.stringConcatNullable" to BenchmarkEntryWithInit.create(::StringBenchmark, { stringConcatNullable() }),
"String.stringBuilderConcat" to BenchmarkEntryWithInit.create(::StringBenchmark, { stringBuilderConcat() }),
"String.stringBuilderConcatNullable" to BenchmarkEntryWithInit.create(::StringBenchmark, { stringBuilderConcatNullable() }),
"String.summarizeSplittedCsv" to BenchmarkEntryWithInit.create(::StringBenchmark, { summarizeSplittedCsv() }),
"Switch.testSparseIntSwitch" to BenchmarkEntryWithInit.create(::SwitchBenchmark, { testSparseIntSwitch() }),
"Switch.testDenseIntSwitch" to BenchmarkEntryWithInit.create(::SwitchBenchmark, { testDenseIntSwitch() }),
"Switch.testConstSwitch" to BenchmarkEntryWithInit.create(::SwitchBenchmark, { testConstSwitch() }),
"Switch.testObjConstSwitch" to BenchmarkEntryWithInit.create(::SwitchBenchmark, { testObjConstSwitch() }),
"Switch.testVarSwitch" to BenchmarkEntryWithInit.create(::SwitchBenchmark, { testVarSwitch() }),
"Switch.testStringsSwitch" to BenchmarkEntryWithInit.create(::SwitchBenchmark, { testStringsSwitch() }),
"Switch.testEnumsSwitch" to BenchmarkEntryWithInit.create(::SwitchBenchmark, { testEnumsSwitch() }),
"Switch.testDenseEnumsSwitch" to BenchmarkEntryWithInit.create(::SwitchBenchmark, { testDenseEnumsSwitch() }),
"Switch.testSealedWhenSwitch" to BenchmarkEntryWithInit.create(::SwitchBenchmark, { testSealedWhenSwitch() }),
"WithIndicies.withIndicies" to BenchmarkEntryWithInit.create(::WithIndiciesBenchmark, { withIndicies() }),
"WithIndicies.withIndiciesManual" to BenchmarkEntryWithInit.create(::WithIndiciesBenchmark, { withIndiciesManual() }),
"OctoTest" to BenchmarkEntry(::octoTest),
"Calls.finalMethod" to BenchmarkEntryWithInit.create(::CallsBenchmark, { finalMethodCall() }),
"Calls.openMethodMonomorphic" to BenchmarkEntryWithInit.create(::CallsBenchmark, { classOpenMethodCall_MonomorphicCallsite() }),
"Calls.openMethodBimorphic" to BenchmarkEntryWithInit.create(::CallsBenchmark, { classOpenMethodCall_BimorphicCallsite() }),
"Calls.openMethodTrimorphic" to BenchmarkEntryWithInit.create(::CallsBenchmark, { classOpenMethodCall_TrimorphicCallsite() }),
"Calls.interfaceMethodMonomorphic" to BenchmarkEntryWithInit.create(::CallsBenchmark, { interfaceMethodCall_MonomorphicCallsite() }),
"Calls.interfaceMethodBimorphic" to BenchmarkEntryWithInit.create(::CallsBenchmark, { interfaceMethodCall_BimorphicCallsite() }),
"Calls.interfaceMethodTrimorphic" to BenchmarkEntryWithInit.create(::CallsBenchmark, { interfaceMethodCall_TrimorphicCallsite() }),
"Calls.returnBoxUnboxFolding" to BenchmarkEntryWithInit.create(::CallsBenchmark, { returnBoxUnboxFolding() }),
"Calls.parameterBoxUnboxFolding" to BenchmarkEntryWithInit.create(::CallsBenchmark, { parameterBoxUnboxFolding() }),
"CoordinatesSolver.solve" to BenchmarkEntryWithInit.create(::CoordinatesSolverBenchmark, { solve() }),
"GraphSolver.solve" to BenchmarkEntryWithInit.create(::GraphSolverBenchmark, { solve() })
)
)
}
fun main(args: Array<String>) {
val launcher = RingLauncher()
BenchmarksRunner.runBenchmarks(args, { parser: ArgParser ->
RingLauncher(parser.get<Int>("warmup")!!, parser.get<Int>("repeat")!!, parser.get<String>("prefix")!!)
.launch(parser.getAll<String>("filter"), parser.getAll<String>("filterRegex"))
})
launcher.launch(parser.get<Int>("warmup")!!, parser.get<Int>("repeat")!!, parser.get<String>("prefix")!!,
parser.getAll<String>("filter"), parser.getAll<String>("filterRegex"))
}, benchmarksListAction = launcher::benchmarksListAction)
}
@@ -133,8 +133,6 @@ class CoordinatesSolverBenchmark {
var ss: List<Coordinate>? = null
while (ss == null) {
//println("o$o, limit: $limit")
if (o == 0) {
ss = solveWithLimit(limit, MAZE_START) { it[it.size - 1] == objects[0] }
} else {
@@ -342,7 +340,11 @@ class CoordinatesSolverBenchmark {
val output = solver.solve()
for (c in output.steps) {
val value = if (c == null) { "felvesz" } else { "${c.x} ${c.y}" }
val value = if (c == null) {
"felvesz"
} else {
"${c.x} ${c.y}"
}
}
}
}
File diff suppressed because it is too large Load Diff
@@ -16,8 +16,15 @@
package org.jetbrains.benchmarksLauncher
import kotlin.reflect.KFunction0
interface AbstractBenchmarkEntry
class BenchmarksCollection(private val benchmarks: MutableMap<String, KFunction0<Any?>> = mutableMapOf()) :
MutableMap<String, KFunction0<Any?>> by benchmarks {
class BenchmarkEntryWithInit(val ctor: ()->Any, val lambda: (Any) -> Any?): AbstractBenchmarkEntry {
companion object {
inline fun <reified T: Any> create(noinline ctor: ()->T, crossinline lambda: T.() -> Any?) = BenchmarkEntryWithInit(ctor) { (it as T).lambda() }
}
}
class BenchmarkEntry(val lambda: () -> Any?) : AbstractBenchmarkEntry
class BenchmarksCollection(private val benchmarks: MutableMap<String, AbstractBenchmarkEntry> = mutableMapOf()) :
MutableMap<String, AbstractBenchmarkEntry> by benchmarks
@@ -19,10 +19,10 @@ package org.jetbrains.benchmarksLauncher
import org.jetbrains.report.BenchmarkResult
class JsonReportCreator(val data: Iterable<BenchmarkResult>) {
fun printJsonReport(jsonReport: String): Unit {
fun printJsonReport(jsonReport: String?): Unit {
val reportText = data.joinToString(prefix = "[", postfix = "]") {
it.toJson()
}
writeToFile(jsonReport, reportText)
jsonReport?.let { writeToFile(it, reportText) } ?: print(reportText)
}
}
@@ -16,24 +16,40 @@
package org.jetbrains.benchmarksLauncher
import kotlin.math.sqrt
import org.jetbrains.report.BenchmarkResult
import org.jetbrains.kliopt.*
import kotlin.reflect.KFunction0
abstract class Launcher(val numWarmIterations: Int, val numberOfAttempts: Int, val prefix: String = "") {
class Results(val mean: Double, val variance: Double)
abstract class Launcher {
abstract val benchmarks: BenchmarksCollection
fun add(name: String, benchmark:() -> Any?) {
fun benchmarkWrapper() {
benchmark()
}
benchmarks[name] = ::benchmarkWrapper
fun add(name: String, benchmark: AbstractBenchmarkEntry) {
benchmarks[name] = benchmark
}
fun launch(filters: Collection<String>? = null,
fun runBenchmark(benchmarkInstance: Any?, benchmark: AbstractBenchmarkEntry, repeatNumber: Int): Long {
var i = repeatNumber
return if (benchmark is BenchmarkEntryWithInit) {
cleanup()
measureNanoTime {
while (i-- > 0) benchmark.lambda(benchmarkInstance!!)
cleanup()
}
} else {
cleanup()
measureNanoTime {
if (benchmark is BenchmarkEntry) {
while (i-- > 0) benchmark.lambda()
cleanup()
}
}
}
}
fun launch(numWarmIterations: Int,
numberOfAttempts: Int,
prefix: String = "",
filters: Collection<String>? = null,
filterRegexes: Collection<String>? = null): List<BenchmarkResult> {
val regexes = filterRegexes?.map { it.toRegex() } ?: listOf()
val filterSet = filters?.toHashSet() ?: hashSetOf()
@@ -45,19 +61,13 @@ abstract class Launcher(val numWarmIterations: Int, val numberOfAttempts: Int, v
error("No matching benchmarks found")
val benchmarkResults = mutableListOf<BenchmarkResult>()
for ((name, benchmark) in runningBenchmarks) {
val benchmarkInstance = (benchmark as? BenchmarkEntryWithInit)?.ctor?.invoke()
var i = numWarmIterations
while (i-- > 0) benchmark()
cleanup()
runBenchmark(benchmarkInstance, benchmark, i)
var autoEvaluatedNumberOfMeasureIteration = 1
while (true) {
var j = autoEvaluatedNumberOfMeasureIteration
cleanup()
val time = measureNanoTime {
while (j-- > 0) {
benchmark()
}
cleanup()
}
val time = runBenchmark(benchmarkInstance, benchmark, j)
if (time >= 100L * 1_000_000) // 100ms
break
autoEvaluatedNumberOfMeasureIteration *= 2
@@ -65,13 +75,7 @@ abstract class Launcher(val numWarmIterations: Int, val numberOfAttempts: Int, v
val samples = DoubleArray(numberOfAttempts)
for (k in samples.indices) {
i = autoEvaluatedNumberOfMeasureIteration
cleanup()
val time = measureNanoTime {
while (i-- > 0) {
benchmark()
}
cleanup()
}
val time = runBenchmark(benchmarkInstance, benchmark, i)
val scaledTime = time * 1.0 / autoEvaluatedNumberOfMeasureIteration
samples[k] = scaledTime
// Save benchmark object
@@ -82,10 +86,20 @@ abstract class Launcher(val numWarmIterations: Int, val numberOfAttempts: Int, v
}
return benchmarkResults
}
fun benchmarksListAction(argParser: ArgParser) {
benchmarks.keys.forEach {
println(it)
}
}
}
object BenchmarksRunner {
fun parse(args: Array<String>): ArgParser {
fun parse(args: Array<String>, benchmarksListAction: (ArgParser)->Unit): ArgParser? {
val actions = mapOf("list" to Action(
benchmarksListAction,
ArgParser(listOf<OptionDescriptor>()))
)
val options = listOf(
OptionDescriptor(ArgType.Int(), "warmup", "w", "Number of warm up iterations", "20"),
OptionDescriptor(ArgType.Int(), "repeat", "r", "Number of each benchmark run", "60"),
@@ -96,23 +110,23 @@ object BenchmarksRunner {
)
// Parse args.
val argParser = ArgParser(options)
argParser.parse(args)
return argParser
val argParser = ArgParser(options, actions = actions)
return if (argParser.parse(args)) argParser else null
}
fun collect(results: List<BenchmarkResult>, parser: ArgParser) {
parser.get<String>("output")?.let {
JsonReportCreator(results).printJsonReport(it)
}
JsonReportCreator(results).printJsonReport(parser.get<String>("output"))
}
fun runBenchmarks(args: Array<String>,
run: (parser: ArgParser) -> List<BenchmarkResult>,
parseArgs: (args: Array<String>) -> ArgParser = this::parse,
collect: (results: List<BenchmarkResult>, parser: ArgParser) -> Unit = this::collect) {
val parser = parseArgs(args)
val results = run(parser)
collect(results, parser)
parseArgs: (args: Array<String>, benchmarksListAction: (ArgParser)->Unit) -> ArgParser? = this::parse,
collect: (results: List<BenchmarkResult>, parser: ArgParser) -> Unit = this::collect,
benchmarksListAction: (ArgParser)->Unit) {
val parser = parseArgs(args, benchmarksListAction)
parser?.let {
val results = run(parser)
collect(results, parser)
}
}
}
@@ -6,7 +6,7 @@
import org.jetbrains.benchmarksLauncher.*
import org.jetbrains.kliopt.*
class SwiftLauncher(numWarmIterations: Int, numberOfAttempts: Int, prefix: String): Launcher(numWarmIterations, numberOfAttempts, prefix) {
class SwiftLauncher: Launcher() {
override val benchmarks = BenchmarksCollection(
mutableMapOf(
)
+35 -17
View File
@@ -10,22 +10,40 @@ var runner = BenchmarksRunner()
let args = KotlinArray(size: Int32(CommandLine.arguments.count - 1), init: {index in
CommandLine.arguments[Int(truncating: index) + 1]
})
let companion = BenchmarkEntryWithInit.Companion()
var swiftLauncher = SwiftLauncher()
runner.runBenchmarks(args: args, run: { (parser: ArgParser) -> [BenchmarkResult] in
var swiftBenchmarks = SwiftInteropBenchmarks()
var swiftLauncher = SwiftLauncher(numWarmIterations: parser.get(name: "warmup") as! Int32,
numberOfAttempts: parser.get(name: "repeat") as! Int32, prefix: parser.get(name: "prefix") as! String)
swiftLauncher.add(name: "createMultigraphOfInt", benchmark: swiftBenchmarks.createMultigraphOfInt)
swiftLauncher.add(name: "fillCityMap", benchmark: swiftBenchmarks.fillCityMap)
swiftLauncher.add(name: "searchRoutesInSwiftMultigraph", benchmark: swiftBenchmarks.searchRoutesInSwiftMultigraph)
swiftLauncher.add(name: "searchTravelRoutes", benchmark: swiftBenchmarks.searchTravelRoutes)
swiftLauncher.add(name: "availableTransportOnMap", benchmark: swiftBenchmarks.availableTransportOnMap)
swiftLauncher.add(name: "allPlacesMapedByInterests", benchmark: swiftBenchmarks.allPlacesMapedByInterests)
swiftLauncher.add(name: "getAllPlacesWithStraightRoutesTo", benchmark: swiftBenchmarks.getAllPlacesWithStraightRoutesTo)
swiftLauncher.add(name: "goToAllAvailablePlaces", benchmark: swiftBenchmarks.goToAllAvailablePlaces)
swiftLauncher.add(name: "removeVertexAndEdgesSwiftMultigraph", benchmark: swiftBenchmarks.removeVertexAndEdgesSwiftMultigraph)
swiftLauncher.add(name: "stringInterop", benchmark: swiftBenchmarks.stringInterop)
swiftLauncher.add(name: "simpleFunction", benchmark: swiftBenchmarks.simpleFunction)
return swiftLauncher.launch(filters: parser.getAll(name: "filter"), filterRegexes: parser.getAll(name: "filterRegex"))
}, parseArgs: runner.parse, collect: { (benchmarks: [BenchmarkResult], parser: ArgParser) -> Void in
swiftLauncher.add(name: "createMultigraphOfInt", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).createMultigraphOfInt() }))
swiftLauncher.add(name: "fillCityMap", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).fillCityMap() }))
swiftLauncher.add(name: "searchRoutesInSwiftMultigraph", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).searchRoutesInSwiftMultigraph () }))
swiftLauncher.add(name: "searchTravelRoutes", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).searchTravelRoutes() }))
swiftLauncher.add(name: "availableTransportOnMap", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).availableTransportOnMap() }))
swiftLauncher.add(name: "allPlacesMapedByInterests", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).allPlacesMapedByInterests() }))
swiftLauncher.add(name: "getAllPlacesWithStraightRoutesTo", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).getAllPlacesWithStraightRoutesTo() }))
swiftLauncher.add(name: "goToAllAvailablePlaces", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).goToAllAvailablePlaces() }))
swiftLauncher.add(name: "removeVertexAndEdgesSwiftMultigraph", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).removeVertexAndEdgesSwiftMultigraph() }))
swiftLauncher.add(name: "stringInterop", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).stringInterop() }))
swiftLauncher.add(name: "simpleFunction", benchmark: companion.create(ctor: { return SwiftInteropBenchmarks() },
lambda: { ($0 as! SwiftInteropBenchmarks).simpleFunction() }))
return swiftLauncher.launch(numWarmIterations: parser.get(name: "warmup") as! Int32,
numberOfAttempts: parser.get(name: "repeat") as! Int32,
prefix: parser.get(name: "prefix") as! String, filters: parser.getAll(name: "filter"),
filterRegexes: parser.getAll(name: "filterRegex"))
}, parseArgs: { (args: KotlinArray, benchmarksListAction: ((ArgParser) -> KotlinUnit)) -> ArgParser? in
return runner.parse(args: args, benchmarksListAction: swiftLauncher.benchmarksListAction) },
collect: { (benchmarks: [BenchmarkResult], parser: ArgParser) -> Void in
runner.collect(results: benchmarks, parser: parser)
})
}, benchmarksListAction: swiftLauncher.benchmarksListAction)
+2 -2
View File
@@ -70,14 +70,14 @@ static_assert(sizeof(ContainerHeader) % kObjectAlignment == 0, "sizeof(Container
#if USE_GC
// Collection threshold default (collect after having so many elements in the
// release candidates set).
constexpr size_t kGcThreshold = 16 * 1024;
constexpr size_t kGcThreshold = 8 * 1024;
#if GC_ERGONOMICS
// Ergonomic thresholds.
// If GC to computations time ratio is above that value,
// increase GC threshold by 1.5 times.
constexpr double kGcToComputeRatioThreshold = 0.5;
// Never exceed this value when increasing GC threshold.
constexpr size_t kMaxErgonomicThreshold = 4 * 1024;
constexpr size_t kMaxErgonomicThreshold = 16 * 1024;
#endif // GC_ERGONOMICS
// Threshold of size for toFree set, triggering actual cycle collector.
constexpr size_t kMaxToFreeSize = 8 * 1024;