https://kotlinlang.org logo
#gsoc
Title
# gsoc
q

Qizhao Chen

02/29/2024, 10:17 PM
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

Abduqodiri Qurbonzoda [JB]

03/04/2024, 4:55 PM
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

Qizhao Chen

03/04/2024, 5:02 PM
Okay, many thanks for your reply!
a

Abduqodiri Qurbonzoda [JB]

03/06/2024, 12:05 PM
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

Qizhao Chen

03/06/2024, 1:03 PM
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

Abduqodiri Qurbonzoda [JB]

03/08/2024, 1:01 PM
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?
26 Views