Skip to content

Commit

Permalink
channel capacity changed to be a parameter of the benchmark
Browse files Browse the repository at this point in the history
Signed-off-by: Laszlo Hornyak <[email protected]>
  • Loading branch information
K0zka committed Jul 25, 2024
1 parent bfbd711 commit 3bd7807
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ open class ChannelOverheadBenchmark {
@Param("0", "1", "2", "3", "4")
var stepCount: Int = 0

@Param("0", "1", "2", "3", "4")
var capacity: Int = 0

@Benchmark
fun run() = runBlocking {
val channel = produce(capacity = 16) {
val channel = produce(capacity = capacity) {
repeat(1000_000) {
send(it)
}
Expand Down

0 comments on commit 3bd7807

Please sign in to comment.