All Questions
8
questions
2
votes
1
answer
117
views
Run JMH in dry-run mode
I am working on fixing a bug in kotlinx.benchmark, which wraps JMH. Development is made much slower because the tests actually run the benchmarks, which for what I'm doing, is not important. I just ...
0
votes
1
answer
614
views
How to write JMH benchmarks in Kotlin without using melix/jmh-gradle-plugin?
Kotlin benchmarks using plugin are written and run. As far as I understand, jmh is focused on writing benchmarks, and then building a jar application, and launching the application itself. I would ...
0
votes
0
answers
356
views
Why ExecutorService is much faster than Coroutines in this example? [Solved]
Update:
I made 2 silly mistakes!
I submitted only 1 task in the executor service example
I forgot to await for the tasks to finish.
Fixing the test, lead to all 3 examples having around 190-200 ms/...
3
votes
0
answers
612
views
How to use JMH in Gradle with Kotlin DSL
My question is similar to How to use JMH with gradle?, only with one caveat that I use Gradle Kotlin DSL. I also found this article https://arbitrary-but-fixed.net/java/algorithms/2019/09/29/jmh-...
0
votes
1
answer
1k
views
Kotlin measureTime differs from kotlinx-benchmark (jmh) by far
I'm testing with the following class (You can find a git repository here):
@ExperimentalStdlibApi
@State(Scope.Benchmark)
class TestBenchmark {
private fun benchmark() : List<Int> {
...
1
vote
0
answers
275
views
Tests in Gradle sub-project cannot see Kotlin internal visibility
Kotlin internal visibility is scoped to the "module" including the helpful statement that it may be:
a Gradle source set (with the exception that the test source set can access the internal ...
3
votes
2
answers
307
views
Reliably measure JVM allocations
I have two implementations of the same algorithm. I would like to verify that non of them uses more memory than necessary, or, in other words, that they allocate exactly the same number of objects.
...
2
votes
1
answer
2k
views
Kotlin's kapt plugin for gradle does not work for custom source set (JMH)
Having a Kotlin project with Gradle setup:
apply plugin: 'kotlin'
apply plugin: 'kotlin-kapt'
dependencies {
kapt 'org.openjdk.jmh:jmh-generator-annprocess:1.18'
...
}
Putting benchmarks ...