Skip to content

Commit

Permalink
Benchmarks: create new topics for producers tests (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
ennru authored and seglo committed Sep 30, 2019
1 parent 9284db1 commit e54f767
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions benchmarks/src/it/scala/akka/kafka/benchmarks/Producer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ class ApacheKafkaPlainProducer extends BenchmarksBase() {
private val prefix = "apache-kafka-plain-producer"

it should "bench with small messages" in {
val cmd = RunTestCommand(prefix, bootstrapServers, topic_2000_100)
val cmd = RunTestCommand(prefix, bootstrapServers, topic_2000_100.freshTopic)
runPerfTest(cmd, KafkaProducerFixtures.initializedProducer(cmd), KafkaProducerBenchmarks.plainFlow)
}

it should "bench with 500b messages" in {
val cmd = RunTestCommand(prefix + "-500b", bootstrapServers, topic_2000_500)
val cmd = RunTestCommand(prefix + "-500b", bootstrapServers, topic_2000_500.freshTopic)
runPerfTest(cmd, KafkaProducerFixtures.initializedProducer(cmd), KafkaProducerBenchmarks.plainFlow)
}

it should "bench with normal messages" in {
val cmd = RunTestCommand(prefix + "-normal-msg", bootstrapServers, topic_2000_5000)
val cmd = RunTestCommand(prefix + "-normal-msg", bootstrapServers, topic_2000_5000.freshTopic)
runPerfTest(cmd, KafkaProducerFixtures.initializedProducer(cmd), KafkaProducerBenchmarks.plainFlow)
}

it should "bench with normal messages written to 8 partitions" in {
val cmd =
RunTestCommand(prefix + "-normal-msg-8-partitions", bootstrapServers, topic_2000_5000_8)
RunTestCommand(prefix + "-normal-msg-8-partitions", bootstrapServers, topic_2000_5000_8.freshTopic)
runPerfTest(cmd, KafkaProducerFixtures.initializedProducer(cmd), KafkaProducerBenchmarks.plainFlow)
}
}
Expand All @@ -33,23 +33,23 @@ class AlpakkaKafkaPlainProducer extends BenchmarksBase() {
private val prefix = "alpakka-kafka-plain-producer"

it should "bench with small messages" in {
val cmd = RunTestCommand(prefix, bootstrapServers, topic_2000_100)
val cmd = RunTestCommand(prefix, bootstrapServers, topic_2000_100.freshTopic)
runPerfTest(cmd, ReactiveKafkaProducerFixtures.flowFixture(cmd), ReactiveKafkaProducerBenchmarks.plainFlow)
}

it should "bench with 500b messages" in {
val cmd = RunTestCommand(prefix + "-500b", bootstrapServers, topic_2000_500)
val cmd = RunTestCommand(prefix + "-500b", bootstrapServers, topic_2000_500.freshTopic)
runPerfTest(cmd, ReactiveKafkaProducerFixtures.flowFixture(cmd), ReactiveKafkaProducerBenchmarks.plainFlow)
}

it should "bench with normal messages" in {
val cmd = RunTestCommand(prefix + "-normal-msg", bootstrapServers, topic_2000_5000)
val cmd = RunTestCommand(prefix + "-normal-msg", bootstrapServers, topic_2000_5000.freshTopic)
runPerfTest(cmd, ReactiveKafkaProducerFixtures.flowFixture(cmd), ReactiveKafkaProducerBenchmarks.plainFlow)
}

it should "bench with normal messages written to 8 partitions" in {
val cmd =
RunTestCommand(prefix + "-normal-msg-8-partitions", bootstrapServers, topic_2000_5000_8)
RunTestCommand(prefix + "-normal-msg-8-partitions", bootstrapServers, topic_2000_5000_8.freshTopic)
runPerfTest(cmd, ReactiveKafkaProducerFixtures.flowFixture(cmd), ReactiveKafkaProducerBenchmarks.plainFlow)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ object PerfFixtureHelpers {
topic: String = randomId()
) {
def replicationFactor = BuildInfo.kafkaScale
def freshTopic: FilledTopic = copy(topic = randomId())
}
}

Expand Down

0 comments on commit e54f767

Please sign in to comment.