-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiplatform benchmarks baseline #4350
base: develop
Are you sure you want to change the base?
Conversation
I see that the |
"--add-exports", "java.base/sun.security.action=ALL-UNNAMED", | ||
"--add-exports", "java.base/jdk.internal.util=ALL-UNNAMED") // in the model checking mode | ||
"--add-exports", "java.base/jdk.internal.util=ALL-UNNAMED" | ||
) // in the model checking mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pro tip: use Difftastic when reviewing such changes! In a structural diff, the trivial formatting edits don't show up at all.
dependencies { | ||
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:${version("benchmarks")}") | ||
} | ||
dependsOn(bmm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is bmm
needed? Is using benchmarkMain
(defined above) worse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
kotlin.srcDir("benchmarks/main/kotlin") | ||
} | ||
|
||
ss.create("jvmBenchmark") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the inconsistency with val benchmarkMain
come from? Why not val jvmBenchmark by creating {
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -58,6 +60,7 @@ kotlin { | |||
implementation("org.openjdk.jol:jol-core:0.16") | |||
} | |||
} | |||
setupBenchmarkSourceSets(this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a separate function? Simply for the sake of readability, or are there other motives?
Also, I'd prefer setupBenchmarkSourceSets(sourceSets)
outside the sourceSets
block, so that it's clearer what gets passed as the parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the sake of readability, to confine benchmark configuration which is far from trivial.
If it were benchmarks { jvm {} ...}
, I would have left it here
./gradlew :kotlinx-coroutines-core:macosArm64BenchmarkBenchmark | ||
// Figure out what to use | ||
./gradlew :kotlinx-coroutines-core:tasks | grep -i bench |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./gradlew :kotlinx-coroutines-core:tasks | grep -i bench | |
./gradlew :kotlinx-coroutines-core:tasks | grep -i "BenchmarkBenchmark " |
Seems much more reliable.
I needed this for Kotlin/kotlinx-atomicfu#499 and decided to tidy it up a bit and make it usable.
Adding @fzhinkin to verify the sourcesets setup