You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scenario is the following: @Setup sets up the target entity/system and sets up a data egress that is repeatedly invoked from the target benchmark method.
For the benchmark to be representative, egress should properly consume the data.
The boiled down example might be the following:
lateinit var flow: Flow<Int>
@Setup
fun prepare(bh: Blackhole) {
flow = createFlow().onEach { bh.consume(it) }
}
@Benchmark
fun collect() {
// Measure collect only and the cost of the data flow
flow.collect()
}
The text was updated successfully, but these errors were encountered:
Real-world use-case: https://github.com/sellmair/evas/blob/sellmair/evas/src/commonBenchmark/kotlin/io/sellmair/evas/benchmark/events/EmitBenchmark.kt
The scenario is the following:
@Setup
sets up the target entity/system and sets up a data egress that is repeatedly invoked from the target benchmark method.For the benchmark to be representative, egress should properly consume the data.
The boiled down example might be the following:
The text was updated successfully, but these errors were encountered: