Kotlin / kotlinx-benchmark

Kotlin multiplatform benchmarking toolkit
Apache License 2.0
499 stars 40 forks source link

Support debug build configuration for K/N #189

Closed fzhinkin closed 3 months ago

fzhinkin commented 7 months ago

Currently, kotlinx-benchmark implicitly use release configuration for K/N builds. That's absolutely sane and reasonable default. However, in some cases (like this), performance need to be collected and validated for debug builds.

It would be nice to have an option to choose K/N build configuration, with release still being a default.

fzhinkin commented 7 months ago

Probably, the build configuration could be configured when a benchmarking target is declared. Something like this:

benchmark {
    targets {
        register("macosArm64") {
             this as NativeBenchmarkTarget
             buildType = NativeBuildType.DEBUG
             // or simply, debug = true
        }
    }
}