Add JMH benchmark for auto-mapping code#140
Conversation
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a JMH benchmarking suite for the auto-mapping layer to help profile and optimize performance. Key changes:
- Promote
DbFlavourto a public API and update imports across tests and main code. - Add new benchmark classes and a script (
run-mapper.sh) to run mapper performance tests via JMH. - Adjust JMH plugin configuration and refine exception messaging in
SQLTypesConverter.
Reviewed Changes
Copilot reviewed 34 out of 36 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| coroutines/src/…/FlowQueryTest.kt | Switched import to public DbFlavour |
| coroutines/src/…/KapperKotlinFlowQueryFun.kt | Switched import to public DbFlavour |
| core/src/main/kotlin/.../SQLTypesConverter.kt | Refined unsupported-conversion exception message; imported public DbFlavour. |
| core/src/main/kotlin/.../DbFlavourFunc.kt | Removed internal DbFlavour enum and added import of public version |
| core/src/main/kotlin/net/samyn/kapper/DbFlavour.kt | Added public DbFlavour enum |
| core/src/test/kotlin/... | Updated dozens of tests to import public DbFlavour |
| benchmark/src/main/kotlin/... | Added MapperBenchmark interface and multiple mapper benchmarks |
| benchmark/src/jmh/.../AutoMapperBenchmark.kt | Added JMH benchmark harness for mapping scenarios |
| benchmark/run-mapper.sh | New script to build and execute the JMH benchmarks |
| benchmark/build.gradle.kts | Updated JMH plugin settings and added custom JMH tasks |
Code Coverage
|
Unit Tests 42 files +1 42 suites +1 20s ⏱️ +3s Results for commit b19566d. ± Comparison against base commit 965f4e2. This pull request removes 42 and adds 45 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
40f7641 to
b19566d
Compare
|



This will facilate optimisation efforts.