KOTLIN_BROADCAST Telegram 1588
Для замеров скорости работы Kotlin кода на разных платформах используйте KotlinX Benchmark

Вам надо подключить Gradle плагин и затем провести настройка бенчмарка
// build.gradle.kts
benchmark {
targets {
register("js")
register("linuxX64")
}

configurations {
named("main") {
warmups = 20
iterations = 10
iterationTime = 3
iterationTimeUnit = "s"
}

register("smoke") {
include("<pattern of fully qualified name>")
warmups = 5
iterations = 3
iterationTime = 500
iterationTimeUnit = "ms"
}
}
}


Затем вы пишите тест подобный JVM Unit тесту

@State(Scope.Benchmark)
class MyBenchmark {
private val size = 10
private val list = ArrayList<Int>()

@Setup
fun prepare() {
for (i in 0..<size) list += i
}

@TearDown
fun cleanup() { list.clear() }

@Benchmark
fun benchmarkMethod(): Int = list.sum()
}


#benchmark



tgoop.com/kotlin_broadcast/1588
Create:
Last Update:

Для замеров скорости работы Kotlin кода на разных платформах используйте KotlinX Benchmark

Вам надо подключить Gradle плагин и затем провести настройка бенчмарка

// build.gradle.kts
benchmark {
targets {
register("js")
register("linuxX64")
}

configurations {
named("main") {
warmups = 20
iterations = 10
iterationTime = 3
iterationTimeUnit = "s"
}

register("smoke") {
include("<pattern of fully qualified name>")
warmups = 5
iterations = 3
iterationTime = 500
iterationTimeUnit = "ms"
}
}
}


Затем вы пишите тест подобный JVM Unit тесту

@State(Scope.Benchmark)
class MyBenchmark {
private val size = 10
private val list = ArrayList<Int>()

@Setup
fun prepare() {
for (i in 0..<size) list += i
}

@TearDown
fun cleanup() { list.clear() }

@Benchmark
fun benchmarkMethod(): Int = list.sum()
}


#benchmark

BY Kotlin Multiplatform Broadcast


Share with your friend now:
tgoop.com/kotlin_broadcast/1588

View MORE
Open in Telegram


Telegram News

Date: |

With the “Bear Market Screaming Therapy Group,” we’ve now transcended language. Each account can create up to 10 public channels End-to-end encryption is an important feature in messaging, as it's the first step in protecting users from surveillance. It’s yet another bloodbath on Satoshi Street. As of press time, Bitcoin (BTC) and the broader cryptocurrency market have corrected another 10 percent amid a massive sell-off. Ethereum (EHT) is down a staggering 15 percent moving close to $1,000, down more than 42 percent on the weekly chart. Polls
from us


Telegram Kotlin Multiplatform Broadcast
FROM American