Kotlin multiplatform benchmarking toolkit

Overview

JetBrains incubator project GitHub license Build status Maven Central Gradle Plugin Portal

NOTE:   Starting from version 0.3.0 of the library:

  • The library runtime is published to Maven Central and no longer published to Bintray.
  • The Gradle plugin is published to Gradle Plugin Portal
  • The Gradle plugin id has changed to org.jetbrains.kotlinx.benchmark
  • The library runtime artifact id has changed to kotlinx-benchmark-runtime

NOTE:   When Kotlin 1.5.0 or newer is used make sure the kotlin-gradle-plugin is pulled from Maven Central, not Gradle Plugin Portal. For more information: https://github.com/Kotlin/kotlinx-benchmark/issues/42

kotlinx.benchmark is a toolkit for running benchmarks for multiplatform code written in Kotlin and running on the next supported targets: JVM, JavaScript.

Technically it can be run on Native target, but current implementation doesn't allow to get right measurements in many cases for native benchmarks, so it isn't recommended to use this library for native benchmarks yet. See issue for more information.

If you're familiar with JMH, it is very similar and uses it under the hoods to run benchmarks on JVM.

Requirements

Gradle 6.8 or newer

Kotlin 1.4.30 or newer

Gradle plugin

Use plugin in build.gradle:

plugins {
    id 'org.jetbrains.kotlinx.benchmark' version '0.3.1'
}

For Kotlin/JS specify building nodejs flavour:

kotlin {
    js {
        nodejs()
        …
    }   
}

For Kotlin/JVM code, add allopen plugin to make JMH happy. Alternatively, make all benchmark classes and methods open.

For example, if you annotated each of your benchmark classes with @State(Scope.Benchmark):

@State(Scope.Benchmark)
class Benchmark {
    …
}

and added the following code to your build.gradle:

plugins {
    id 'org.jetbrains.kotlin.plugin.allopen'
}

allOpen {
    annotation("org.openjdk.jmh.annotations.State")
}

then you don't have to make benchmark classes and methods open.

Runtime Library

You need a runtime library with annotations and code that will run benchmarks.

Enable Maven Central for dependencies lookup:

repositories {
    mavenCentral()
}

Add the runtime to dependencies of the platform source set, e.g.:

kotlin {
    sourceSets {
        commonMain {
             dependencies {
                 implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.3.1")
             }
        }
    }
}

Configuration

In a build.gradle file create benchmark section, and inside it add a targets section. In this section register all targets you want to run benchmarks from. Example for multiplatform project:

benchmark {
    targets {
        register("jvm") 
        register("js")
        register("native")
    }
}

This package can also be used for Java and Kotlin/JVM projects. Register a Java sourceSet as a target:

benchmark {
    targets {
        register("main") 
    }
}

To configure benchmarks and create multiple profiles, create a configurations section in the benchmark block, and place options inside. Toolkit creates main configuration by default, and you can create as many additional configurations, as you need.

benchmark {
    configurations {
        main { 
            // configure default configuration
        }
        smoke { 
            // create and configure "smoke" configuration, e.g. with several fast benchmarks to quickly check
            // if code changes result in something very wrong, or very right. 
        }       
    }
}

Available configuration options:

  • iterations – number of measuring iterations
  • warmups – number of warm up iterations
  • iterationTime – time to run each iteration (measuring and warmup)
  • iterationTimeUnit – time unit for iterationTime (default is seconds)
  • outputTimeUnit – time unit for results output
  • mode – "thrpt" for measuring operations per time, or "avgt" for measuring time per operation
  • include("…") – regular expression to include benchmarks with fully qualified names matching it, as a substring
  • exclude("…") – regular expression to exclude benchmarks with fully qualified names matching it, as a substring
  • param("name", "value1", "value2") – specify a parameter for a public mutable property name annotated with @Param
  • reportFormat – format of report, can be json(default), csv, scsv or text

Time units can be NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, or their short variants such as "ms" or "ns".

Example:

benchmark {
    // Create configurations
    configurations {
        main { // main configuration is created automatically, but you can change its defaults
            warmups = 20 // number of warmup iterations
            iterations = 10 // number of iterations
            iterationTime = 3 // time in seconds per iteration
        }
        smoke {
            warmups = 5 // number of warmup iterations
            iterations = 3 // number of iterations
            iterationTime = 500 // time in seconds per iteration
            iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
        }   
    }
    
    // Setup targets
    targets {
        // This one matches compilation base name, e.g. 'jvm', 'jvmTest', etc
        register("jvm") {
            jmhVersion = "1.21" // available only for JVM compilations & Java source sets
        }
        register("js") {
            // Note, that benchmarks.js uses a different approach of minTime & maxTime and run benchmarks
            // until results are stable. We estimate minTime as iterationTime and maxTime as iterationTime*iterations
        }
        register("native")
    }
}

Separate source sets for benchmarks

Often you want to have benchmarks in the same project, but separated from main code, much like tests. Here is how:

Define source set:

sourceSets {
    benchmarks
}

Propagate dependencies and output from main sourceSet.

dependencies {
    benchmarksCompile sourceSets.main.output + sourceSets.main.runtimeClasspath 
}

You can also add output and compileClasspath from sourceSets.test in the same way if you want to reuse some of the test infrastructure.

Register benchmarks source set:

benchmark {
    targets {
        register("benchmarks")    
    }
}

Examples

The project contains examples subproject that demonstrates using the library.

Comments
  • Multi-format reports

    Multi-format reports

    • CSV/SCSV/TEXT JMH-similar formatter for JS/Native
    • possibility to select format from gradle plugin
    • fixes #34
    • printing summary after suite execution on all platforms
    opened by whyoleg 13
  • Exception in linuxX64BenchmarkGenerate

    Exception in linuxX64BenchmarkGenerate

    In the attached sample project b.zip, which is as minimal as could possibly be,

    $ ./gradlew bench
    
    > Configure project :
    Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.
    
    
    > Task :linuxX64BenchmarkGenerate FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':linuxX64BenchmarkGenerate'.
    > There was a failure while executing work items
       > A failure occurred while executing kotlinx.benchmark.gradle.NativeSourceGeneratorWorker
          > 'org.jetbrains.kotlin.library.KotlinLibrary org.jetbrains.kotlin.library.SearchPathResolver$DefaultImpls.resolve$default(org.jetbrains.kotlin.library.SearchPathResolver, org.jetbrains.kotlin.library.UnresolvedLibrary, boolean, int, java.lang.Object)'
    

    Using --info, --debug, --stacktrace doesn't provide any more useful information.

    opened by ephemient 8
  • Trouble with Kotlin/Native

    Trouble with Kotlin/Native

    I have a simple project in Idea for Kotlin/Native and next build.gradle file:

    plugins {
        id "kotlinx.benchmark" version "0.2.0-dev-8"
        id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
        id 'java'
        id 'org.jetbrains.kotlin.plugin.allopen' version "1.3.61"
    }
    repositories {
        mavenCentral()
        maven { url 'https://dl.bintray.com/kotlin/kotlinx' }
    }
    dependencies {
        implementation "org.jetbrains.kotlinx:kotlinx.benchmark.runtime:0.2.0-dev-8"
    }
    kotlin {
        // For ARM, should be changed to iosArm32 or iosArm64
        // For Linux, should be changed to e.g. linuxX64
        // For MacOS, should be changed to e.g. macosX64
        // For Windows, should be changed to e.g. mingwX64
        mingwX64("mingw") {
            binaries {
                executable {
                    // Change to specify fully qualified name of your application's entry point:
                   entryPoint = 'sample.main'
                    // Specify command-line arguments, if necessary:
                    runTask?.args('')
                }
            }
        }
        sourceSets {
            // Note: To enable common source sets please comment out 'kotlin.import.noCommonSourceSets' property
            // in gradle.properties file and re-import your project in IDE.
            mingwMain {
            }
            mingwTest {
            }
        }
    }
    
    // Use the following Gradle tasks to run your application:
    // :runReleaseExecutableMingw - without debug symbols
    // :runDebugExecutableMingw - with debug symbols
    
    benchmark {
        configurations {
            main {
                iterations = 10
                warmups = 1
            }
        }
        targets {
            register("mingw")
        }
    }
    
    
    allOpen {
        annotation("org.openjdk.jmh.annotations.State")
    }
    

    When I run benchmark task in Gradle, I got:

    Testing started at 21:18 ...
    > Configure project :
    Kotlin Multiplatform Projects are an experimental feature.
    Warning: Cannot find a benchmark compilation 'native', ignoring.
    > Task :compileKotlinMingw UP-TO-DATE
    > Task :mingwProcessResources NO-SOURCE
    > Task :mingwMainKlibrary UP-TO-DATE
    > Task :mingwBenchmarkGenerate FAILED
    FAILURE: Build failed with an exception.
    * What went wrong:
    Execution failed for task ':mingwBenchmarkGenerate'.
    > There was a failure while executing work items
       > A failure occurred while executing kotlinx.benchmark.gradle.NativeSourceGeneratorWorker
          > e: Failed to resolve Kotlin library: stdlib
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    * Get more help at https://help.gradle.org
    BUILD FAILED in 4s
    

    What I am doing wrong?

    Wha I am trying:

    1. Remove allopen
    2. Add additional stdlib
    3. Remve stdlib from External Libraries in Idea (it returns)
    opened by vldF 6
  • Support JS IR

    Support JS IR

    • fixes #30 (actualized #38)
    • share klib resolving logic between JS IR and Native
    • minor cleanup of buildscripts
    • add support for JS IR in integration tests
    • add support for JS IR in example

    Note: user should always specify, if they want to use IR or Legacy for running benchmarks. It will not work when specified BOTH, as target with BOTH can not have executables

    opened by olme04 4
  • Declare system properties reads to be compatible with Gradle configuration cache

    Declare system properties reads to be compatible with Gradle configuration cache

    Gradle reports direct system properties reads as configuration cache problems as system properties are potential build configuration inputs. See https://docs.gradle.org/7.0/userguide/configuration_cache.html for more details

    opened by ALikhachev 4
  • Jvm bench in multiplatform with separate SourceSet. No benchmarks to run; check the include/exclude regexps.

    Jvm bench in multiplatform with separate SourceSet. No benchmarks to run; check the include/exclude regexps.

    I'm trying to benchmark jvm on a multiplatform project with separate sourceSet

    To reproduce just clone this branch

    This is my setup so far:

    kotlin {
        ...
        sourceSets {
            val jvmBench by creating {
                dependsOn(commonMain)
                dependencies {
                    implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.0")
                    //                "benchCompile"(sourceSets.main.output + sourceSets.main.runtimeClasspath)
                }
            }
            ...
        }
        targets {
            jvm {
                compilations.create("bench")
            }
        }
    }
    
    benchmark {
        ...
        targets {
            register("jvm")
            //        register("js")
            //        register("native")
        }
    }
    
    val SourceSetContainer.main: SourceSet
        get() = named("main").get()
    dependencies {
        kspMetadata(projects.processor)
        "jvmBenchImplementation"(sourceSets.main.output + sourceSets.main.runtimeClasspath)
        ...
    }
    

    When I try to execute jvmBenchmark I get:

    Type-safe project accessors is an incubating feature. Configure project : Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties. Task :processor:compileKotlinJvm UP-TO-DATE Task :processor:jvmProcessResources UP-TO-DATE Task :processor:jvmMainClasses UP-TO-DATE Task :processor:jvmJar UP-TO-DATE Task :kspKotlinMetadata UP-TO-DATE Task :compileKotlinJvm UP-TO-DATE Task :compileJava NO-SOURCE Task :jvmProcessResources NO-SOURCE Task :jvmMainClasses UP-TO-DATE Task :jvmBenchmarkGenerate UP-TO-DATE Task :jvmBenchmarkCompile NO-SOURCE Task :jvmBenchmark FAILED Running 'main' benchmarks for 'jvm' Error: Could not find or load main class kotlinx.benchmark.jvm.JvmBenchmarkRunnerKt Caused by: java.lang.ClassNotFoundException: kotlinx.benchmark.jvm.JvmBenchmarkRunnerKt FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':jvmBenchmark'. Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1
    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    • Get more help at https://help.gradle.org Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.3/userguide/command_line_interface.html#sec:command_line_warnings BUILD FAILED in 151ms 7 actionable tasks: 1 executed, 6 up-to-date
    opened by elect86 3
  • Could not find or load main class kotlinx.benchmark.jvm.JvmBenchmarkRunnerKt

    Could not find or load main class kotlinx.benchmark.jvm.JvmBenchmarkRunnerKt

    I am trying to use kotlinx-benchmark in an open source project. I followed all the instructions but I am getting the following error when I try to run the benchmarks from the Gradle panel in IntelliJ IDEA:

    Could not find or load main class kotlinx.benchmark.jvm.JvmBenchmarkRunnerKt
    

    My changes to build.gradle.kts can be seen in the following pull-request:

    https://github.com/tree-ware/tree-ware-kotlin-core/pull/13/files

    I am interested only in JVM benchmarks. I tried adding a dependency to org.jetbrains.kotlinx:kotlinx-benchmark-runtime-jvm but that did not help either.

    opened by deepak-nulu 3
  • Gradle 6 compatibility

    Gradle 6 compatibility

    Currently using with gradle 6 gives:

    Execution failed for task ':examples:benchmarksBenchmarkGenerate'.
    > There was a failure while executing work items
       > A failure occurred while executing kotlinx.benchmark.gradle.JmhBytecodeGeneratorWorker
          > Generation of JMH bytecode failed with 1errors:
              - Group name should be the legal Java identifier.
               [org.openjdk.jmh.generators.reflection.RFMethodInfo@3a40cc4e]
    
    opened by altavir 3
  • Can't run JS IR benchmarks

    Can't run JS IR benchmarks

    Can't run any JS IR benchmark with kotlinx-benchmark 0.4.2

    Affected branch: https://github.com/mipt-npm/kmath/tree/commandertvis/js-benchmark

    Reproduce:

    ./gradlew benchmarks:jsBenchmark
    

    ... does not make any effect (no benchmarks are run).

    opened by CommanderTvis 2
  • Benchmark JAR cannot be built due to duplicate META-INF/versions/9/module-info.class even when jvmTarget=1.8

    Benchmark JAR cannot be built due to duplicate META-INF/versions/9/module-info.class even when jvmTarget=1.8

    Sample project b.zip attached.

    $ ./gradlew bench
    > Task :mainBenchmarkJar FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':mainBenchmarkJar'.
    > Entry META-INF/versions/9/module-info.class is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.3/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
    
    opened by ephemient 2
  • Native benchmarks runner doesn't allow to get right  measurements

    Native benchmarks runner doesn't allow to get right measurements

    Current implementation for K/N part cann't provide realistic results because some features of K/N runtime aren't taken into account. Wrong performance results can confuse K/N users and let them make wrong conclusion.

    opened by LepilkinaElena 2
  • kotlinx-benchmark 0.4.6 cannot find custom compilations of Kotlin 1.8.0

    kotlinx-benchmark 0.4.6 cannot find custom compilations of Kotlin 1.8.0

    MRE: https://github.com/lounres/kotlinx-benchmark-103/tree/89892cfb5198f811d1aa7eeb0704e74026288d67

    I have a multimodule multiplatform project with kotlinx-benchmark 0.4.6 and Kotlin 1.7.21. In all multiplatform modules for each target I add a special compilation for benchmarks and register such JVM compilation in kotlinx-benchmark. It worked well. But after I upgraded Kotlin to version 1.8.0 kotlinx-benchmark Gradle plugin cannot find the compilation any more. It logs

    Warning: Cannot find a benchmark compilation 'jvmBenchmarks', ignoring.
    

    To reproduce the problem, open the MRE and just change version kotlin in gradle/libs.versions.toml to "1.8.0".

    opened by lounres 0
  • Eager tasks creation

    Eager tasks creation

    I've noticed, while debugging similar issues in Kotlin Gradle Plugin, kotlinx-benchmark creates (instead of just registering) tasks eagerly. Some samples of stacktraces:

    at org.gradle.api.internal.tasks.DefaultTaskCollection.getByName(DefaultTaskCollection.java:46)
    at kotlinx.benchmark.gradle.JvmTasksKt.createJvmBenchmarkCompileTask(JvmTasks.kt:133)
    at kotlinx.benchmark.gradle.JvmJavaTasksKt.processJavaSourceSet(JvmJavaTasks.kt:26)
    at kotlinx.benchmark.gradle.BenchmarksPlugin.processConfigurations$lambda-4(BenchmarksPlugin.kt:79)
    
     at org.gradle.api.internal.tasks.DefaultTaskCollection.getByName(DefaultTaskCollection.java:46)
     at kotlinx.benchmark.gradle.JvmTasksKt.createJvmBenchmarkExecTask(JvmTasks.kt:158)
     at kotlinx.benchmark.gradle.JvmJavaTasksKt.processJavaSourceSet(JvmJavaTasks.kt:30)
     at kotlinx.benchmark.gradle.BenchmarksPlugin.processConfigurations$lambda-4(BenchmarksPlugin.kt:79)
    
    opened by Tapchicoma 0
  • Gradle plugin is unsupported in Gradle 8.0

    Gradle plugin is unsupported in Gradle 8.0

    kotlinx.benchmark gradle plugin configures the project in a way that is no longer supported in Gradle 8.0 milestone 2.

    Running: ./gradlew :benchmark:benchmark --no-configration-cache

    Yields the following error:

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem occurred configuring project ':benchmark'.
    > Adding a Configuration as a dependency is no longer allowed as of Gradle 8.0.
    
    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 849ms
    

    The most basic reproducing sample I could make. Change macosX64 -> macosArm64 if you are running on an M1.

    opened by dlam 0
  • Onboarding feedback

    Onboarding feedback

    It wasn't easy to get this working in JVM project :( Adding a plugin and runtime library wasn't enough for JHM annotations to resolve id("org.jetbrains.kotlinx.benchmark") version "0.4.4" implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime-jvm:0.4.4")

    So i tried to add JHM explicitly, picked the latest version implementation("org.openjdk.jmh:jmh-core:1.35")

    Then i followed README and came up with this

    benchmark {
        targets {
            register("main")
        }
    
        configurations {
            val main by getting { // main configuration is created automatically, but you can change its defaults
                warmups = 20 // number of warmup iterations
                iterations = 10 // number of iterations
                iterationTime = 3 // time in seconds per iteration
            }
        }
    }
    
    

    copy-pasted a sample benchmark from https://github.com/Kotlin/kotlinx-benchmark/tree/master/examples/kotlin

    But got this error /home/nikitak/IdeaProjects/pelagie/build/benchmarks/main/sources/org/generated/TestBenchmark_sqrtBenchmark_jmhTest.java:129: error: incompatible types: possible lossy conversion from double to long

    I checked example once again and found that JHM version is specified inside the target https://github.com/Kotlin/kotlinx-benchmark/blob/master/examples/kotlin/build.gradle

    benchmark {
        // Setup configurations
        targets {
            // This one matches sourceSet name above
            register("benchmarks") {
                jmhVersion = "1.21"
            }
        }
    }
    

    I changed target configuration and commented out explicit JHM dependency and now everything is working

    register("main") {
              val a: BenchmarkTarget = this as kotlinx.benchmark.gradle.JvmBenchmarkTarget
              jmhVersion = "1.21"
    }
    

    But actually i can just leave it as:

    register("main") 
    

    So the problem is that for library to resolve i also had to register a target! I didn't think about it, tried to fix resolve another way and ran into a problem with newer versions of JHM being incompatible with generated code =( I tried to downgrade JHM to 1.27, but it also didn't work

    Another pain point was that default build script language for Kotlin project is, well, Kotlin, but all examples are in Groovy.

    improve documentation 
    opened by koperagen 1
  • Examples don't work for Kotlin Multiplatform project

    Examples don't work for Kotlin Multiplatform project

    I've tried copying the examples

    • https://github.com/Kotlin/kotlinx-benchmark/blob/24fb001e8cae88befd5b352b0e281517fe595f67/examples/kotlin-multiplatform/build.gradle
    • https://github.com/Kotlin/kotlinx-benchmark/blob/24fb001e8cae88befd5b352b0e281517fe595f67/examples/kotlin-kts/build.gradle.kts

    but I can't make any good progress, I immediately come across fatal errors.

    Cannot find a benchmark compilation 'main', ignoring.
    
    * Exception is:
    org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':modules:client-tests'
    
    Caused by: java.lang.IllegalStateException: Could not create domain object 'main' (BenchmarkTarget)
    
    Caused by: java.lang.ClassCastException: class kotlinx.benchmark.gradle.BenchmarkTarget cannot be cast to class kotlinx.benchmark.gradle.JvmBenchmarkTarget (kotlinx.benchmark.gradle.BenchmarkTarget and kotlinx.benchmark.gradle.JvmBenchmarkTarget are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @6e21e3fb)
    
    • Kotlin 1.7.10
    • Kotlinx Benchmark 0.4.4
    import kotlinx.benchmark.gradle.JvmBenchmarkTarget
    
    plugins {
        buildsrc.convention.`kotlin-multiplatform` // convention plugin that applies kotlin("multiplatform") 1.7.10
    
        id("org.jetbrains.kotlinx.benchmark")
        kotlin("plugin.allopen")
    }
    
    kotlin {
        jvm()
    
        sourceSets {
            val commonMain by getting {
                dependencies {
                    implementation(kotlin("reflect"))
    
                    implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.4")
                }
            }
    
            val commonTest by getting {
                dependencies {
                    implementation(projects.modules.mockk)
                }
            }
    
            val jvmMain by getting {
                dependencies {
                }
            }
    
            val jvmTest by getting {
                dependencies {
                    implementation(buildsrc.config.Deps.Libs.kotlinTestJunit()) {
                        exclude(group = "junit", module = "junit")
                    }
    
                    implementation(buildsrc.config.Deps.Libs.slfj)
                    implementation(buildsrc.config.Deps.Libs.logback)
    
                    implementation(buildsrc.config.Deps.Libs.junitJupiter)
                }
            }
        }
    }
    
    benchmark {
        configurations {
            named("main") {
                iterationTime = 60
                iterationTimeUnit = "sec"
                iterations = 2
                warmups = 1
            }
        }
        targets {
            register("main") {
                this as JvmBenchmarkTarget
                jmhVersion = "1.33"
            }
        }
    }
    
    allOpen {
        annotation("org.openjdk.jmh.annotations.State")
    }
    
    enhancement improve documentation 
    opened by aSemy 1
Releases(v0.4.6)
  • v0.4.6(Dec 2, 2022)

    • Support Gradle 8.0
    • Sign kotlinx-benchmark-plugin artifacts with the Signing Plugin
    • Upgrade Kotlin version to 1.7.20
    • Upgrade Gradle version to 7.4.2
    Source code(tar.gz)
    Source code(zip)
  • v0.4.5(Nov 2, 2022)

  • v0.4.4(Jun 26, 2022)

  • v0.4.3(Jun 26, 2022)

  • v0.4.2(Jan 25, 2022)

    • Support JS IR backend
    • Support Gradle 7.0 and newer #67
    • Make mode configuration parameter work with values considered valid in README.md
    • Support benchmark @Param values containing spaces #62
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Jan 12, 2022)

  • v0.4.0(Jan 12, 2022)

    • Require the minimum Kotlin version of 1.5.30
    • Add support for other Apple Kotlin/Native targets
    • Improve Kotlin/Native support #24
      • Benchmark each method in its own process, previously all methods where benchmarked in the same process
      • Introduce nativeFork advanced configuration option with the following values:
        • "perBenchmark" (default) – executes all iterations of a benchmark in the same process (one binary execution)
        • "perIteration" – executes each iteration of a benchmark in a separate process, measures in cold Kotlin/Native runtime environment
      • Introduce nativeGCAfterIteration advanced configuration option that when set to true, additionally collects garbage after each measuring iteration (default is false)
    • Rename the "forks" advanced configuration option to "jvmForks" and provide an option to not override the fork value defined in @Fork
    • Fix a failure due to the strict DuplicatesStrategy #39
    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Apr 30, 2021)

  • v0.3.0(Mar 1, 2021)

    • Require the minimum Kotlin version of 1.4.30
    • Require the minimum Gradle version of 6.8
    • Change runtime artifact id from kotlinx.benchmark.runtime to kotlinx-benchmark-runtime
    • Publish runtime to Maven Central instead of Bintray #33
    • Change plugin id from kotlinx.benchmark to org.jetbrains.kotlinx.benchmark
    • Change plugin artifact id from kotlinx.benchmark.gradle to kotlinx-benchmark-plugin
    • Publish plugin to Gradle Plugin Portal instead of Bintray
    Source code(tar.gz)
    Source code(zip)
Owner
Kotlin
Kotlin Tools and Libraries
Kotlin
Double Open license classification for OSS Review Toolkit (ORT) and other uses.

Double Open Policy Configuration This repository is used to maintain the license classification (license-classifications.yml) created by Double Open.

Double Open 8 Nov 7, 2022
Curations and configuration files for the OSS Review Toolkit.

ORT Config This repository contains configuration files for the OSS Review Toolkit. Content Curations The curations directory contains package curatio

OSS Review Toolkit 9 Dec 8, 2022
An experimental UI toolkit for generating PowerPoint presentation files using Compose

ComposePPT An experimental UI toolkit for generating PowerPoint presentation files(.pptx) using Compose. Inspired by Glance and Mosaic. Why? This proj

Fatih Giriş 252 Dec 28, 2022
Real life Kotlin Multiplatform project with an iOS application developed in Swift with SwiftUI, an Android application developed in Kotlin with Jetpack Compose and a backed in Kotlin hosted on AppEngine.

Conferences4Hall Real life Kotlin Multiplatform project with an iOS application developed in Swift with SwiftUI, an Android application developed in K

Gérard Paligot 98 Dec 15, 2022
Opinionated Redux-like implementation backed by Kotlin Coroutines and Kotlin Multiplatform Mobile

CoRed CoRed is Redux-like implementation that maintains the benefits of Redux's core idea without the boilerplate. No more action types, action creato

Kittinun Vantasin 28 Dec 10, 2022
An app architecture for Kotlin/Native on Android/iOS. Use Kotlin Multiplatform Mobile.

An app architecture for Kotlin/Native on Android/iOS. Use Kotlin Multiplatform Mobile. 项目架构主要分为原生系统层、Android/iOS业务SDK层、KMM SDK层、KMM业务逻辑SDK层、iOS sdkfra

libill 4 Nov 20, 2022
A Bluetooth kotlin multiplatform "Cross-Platform" library for iOS and Android

Blue-Falcon A Bluetooth "Cross Platform" Kotlin Multiplatform library for iOS, Android, MacOS, Raspberry Pi and Javascript. Bluetooth in general has t

Andrew Reed 220 Dec 28, 2022
Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project

Newsout Android and iOS mobile client for Nextcloud news App. The Android client is already available to download in the Play Store. F-Droid and Apple

Simon Schubert 118 Oct 3, 2022
Kotlin Multiplatform Application to show Crypto Coins

This is the codebase of Crypto currency Tracking Kotlin Multiplatform App. Components Shared Components Ktor (Network Client) SQL Delight (Local DB) A

Aman Bansal 10 Oct 31, 2022
Dependency Injection library for Kotlin Multiplatform, support iOS and Android

Multiplatform-DI library for Kotlin Multiplatform Lightweight dependency injection framework for Kotlin Multiplatform application Dependency injection

Anna Zharkova 32 Nov 10, 2022
Kotlin multiplatform library template.

template-kmp-library Kotlin multiplatform library template. Has a baseline setup for a multiplatform library supporting all kotlin targets except andr

Martynas Petuška 51 Nov 21, 2022
BuildConfig for Kotlin Multiplatform Project

BuildKonfig BuildConfig for Kotlin Multiplatform Project. It currently supports embedding values from gradle file. Table Of Contents Motivation Usage

Yasuhiro SHIMIZU 331 Jan 4, 2023
Gradle plugin for simplify Kotlin Multiplatform mobile configurations

Mobile Multiplatform gradle plugin This is a Gradle plugin for simple setup of Kotlin Multiplatform mobile Gradle modules. Setup buildSrc/build.gradle

IceRock Development 78 Sep 27, 2022
Generic AST parsing library for kotlin multiplatform

kotlinx.ast kotlinx.ast is a generic AST (Abstract Syntax Tree) parsing library, Kotlin is currently the only supported language. The library is desig

null 235 Dec 29, 2022
KaMP Kit by Touchlab is a collection of code and tools designed to get your mobile team started quickly with Kotlin Multiplatform.

KaMP Kit Welcome to the KaMP Kit! About Goal The goal of the KaMP Kit is to facilitate your evaluation of Kotlin Multiplatform (aka KMP). It is a coll

Touchlab 1.7k Jan 3, 2023
Kotlin Multiplatform Mobile App Template

KMMT : Kotlin Multiplatform Mobile Template Kotlin Multiplatform Mobile Development Simplified KMMT is a KMM based project template designed to simpli

Jitty Andiyan 207 Jan 4, 2023
GraphQL based Jetpack Compose and SwiftUI Kotlin Multiplatform sample

GraphQL based Jetpack Compose and SwiftUI Kotlin Multiplatform sample

John O'Reilly 151 Jan 3, 2023
Playground for learning Kotlin Multiplatform Mobile

This is a playground for learning KMP (KMM Plugin for android studio). Requirements Android Studio Canary 8 Architecture Thanks https://twitter.com/jo

Mitch Tabian 111 Dec 27, 2022
Kotlin Multiplatform project that gets network data from Food2Fork.ca

Food2Fork Recipe App This is the codebase for a Kotlin Multiplatform Mobile course. [Watch the course](https://codingwithmitch.com/courses/kotlin-mult

Mitch Tabian 317 Dec 30, 2022