Hi <@UL7PXDKL3> My name is Connor. I'm interested ...
# gsoc
q
Hi @Abduqodiri Qurbonzoda [JB] My name is Connor. I'm interested in support Android target in kotlinx-benchmark project. May I ask what I could prepare for this project? Or are there any issues I can try?
a
Hi @Qizhao Chen! I’m pleased you found this project interesting. As the first steps to understand what the project is about, I suggest the following: 1. Go to the kotlinx-benchmark repo and read the guide provided in the README. 2. Set up a project to add and run benchmarks. Try running them on multiple supported platforms and with different configurations. 3. Refer to other guides in the library when necessary. 4. If you encounter any issues during the setup process, ask in Slack. You can also suggest documentation improvements to enhance clarity. 5. Try the Android Jetpack microbenchmark library. 6. Consider how you would integrate it into kotlinx-benchmark. For reference: a. Here is how JMH is integrated for running Kotlin/JVM benchmarks. b. Here is how benchmark.js is integrated for running Kotlin/JS benchmarks. c. Here is the entry point for learning androidx.benchmark configuration/integration points. 7. Ask in Slack if you have any questions or difficulties. The knowledge gained from the work completed would make a great proposal for the project.
q
Okay, many thanks for your reply!
a
The main goal is to make sure candidates are familiar with the project and its capabilities, and understand how they work. This is crucial because, during the GSoC, they will be required to implement the same capabilities for the Android target, utilizing androidx.benchmark under the hood when necessary.
q
I've studied the kotlinx-benckmark repo and tried to write my own benckmark in the last few days. Do we only need to integrate the functionality of the microbenckmark library into kotlinx-benckmark? Do we need to consider the macrobenckmark part?
I cloned the kotlinx-benchmark repo, but when I open
JvmBenchmarkAnnotations.kt
in
runtime/jvmMain/src/kotlinx.benchmark
I get this warning as shown below. May I ask why it appears and what I should do to fix it?
a
I cloned the kotlinx-benchmark repo, but when I open
JvmBenchmarkAnnotations.kt
in
runtime/jvmMain/src/kotlinx.benchmark
This is a false-positive warning from the IDE. The compiler will compile the code without any warnings. There is nothing we can do within the project to fix it.
The GSoC project’s goal is to support the Android target in the kotlinx-benchmark library. This support will allow users to benchmark Kotlin code on Android devices and measure how well code performs on Android platform. To archive this, we plan to use an existing benchmarking engine. It avoids the need to create one from scratch. It’s similar to the approach for the Kotlin/JS target. Our aim is to match the capabilities available for other targets, but specifically for Android. We do not intend to directly replicate another library’s functionality. Such a library might be used behind the scenes to implement features of kotlinx-benchmark. However, it won’t appear in the public API.
Having said that, if you find that macrobenchmark can be utilized to implement some capabilities of kotlinx-benchmark, that would be great. Don’t hesitate to elaborate on how it could be used, either here or in your proposal.
Do we only need to integrate the functionality of the microbenckmark library into kotlinx-benckmark? Do we need to consider the macrobenckmark part?