Skip to content

Conversation

@thebehera
Copy link
Contributor

Summary

This PR adds kotlinx-benchmark (JMH wrapper) for proper microbenchmarking across all platforms.

Changes

  • Added kotlinx-benchmark plugin and runtime dependency
  • Configured benchmark targets for JVM, JS, macOS, Linux, and WASM platforms
  • Added benchmark classes in commonTest:
    • BufferBenchmark - Basic allocation benchmarks
    • PlatformBufferBenchmark - Read/write operations and slicing
    • FragmentedReadBufferBenchmark - Fragmented buffer performance

Usage

# Run JVM benchmarks
./gradlew jvmTestBenchmark

# Run macOS benchmarks
./gradlew macosArm64TestBenchmark

# Run JS benchmarks
./gradlew jsTestBenchmark

Test plan

  • JVM benchmarks run successfully
  • Verify other platform benchmarks compile and run

@thebehera thebehera added the skip-release Skip the deployment to maven central label Dec 21, 2025
- Add AndroidX Benchmark library (1.3.3) for Android instrumented benchmarks
- Add Android benchmark test class with allocation, read/write, and slice tests
- Register macosX64Test and linuxX64Test targets in addition to ARM targets
@thebehera thebehera force-pushed the rahul-behera/benchmark branch from 7fe98d9 to ff7ddc5 Compare December 21, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release Skip the deployment to maven central

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants