-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poll heartbeat rate #250
Poll heartbeat rate #250
Changes from 61 commits
0ad10cb
d56095d
bc18d91
fa380f6
7232568
32d238c
622b180
1365c7c
c6c1c32
512f56c
2651712
336a9f2
b835310
e612d64
ca5e98a
4bcf70c
f93ae9a
1c8c5c1
0bf0bff
4974c62
f13d855
d3a4425
0dee12b
bc6eb42
eca6927
6165418
610eb74
f0861e7
d37e3a2
fc1cc4a
6a54a9c
450b086
20416f0
de79221
2b3e3e0
da099c4
a5e6577
874ea8a
7bb610c
a3210c3
df39cd0
ff7f422
6d1ebbf
38f7d47
bac3175
444c2a2
b0316b6
38b31c7
c61857f
edeb179
8c09b6a
d54ed10
9bcd8ac
6f2fa50
50c3d9d
f7991ca
1c71a68
f05abe6
12e75a8
10cbf9f
32c5bd7
1526702
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
tests: | ||
name: scala-${{ matrix.scala }} jdk-${{ matrix.java }} tests | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
java: [8] | ||
scala: [2.11.12, 2.12.10] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: "adopt@1.${{ matrix.java }}" | ||
|
||
- name: Cache SBT Coursier directory | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/coursier/v1 | ||
key: ${{ runner.os }}-coursier-${{ hashFiles('**/*.sbt') }} | ||
restore-keys: | | ||
${{ runner.os }}-coursier- | ||
- name: Cache SBT directory | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.sbt | ||
key: | | ||
${{ runner.os }}-sbt-${{ hashFiles('project/build.properties') }}-${{ hashFiles('project/plugins.sbt') }} | ||
restore-keys: ${{ runner.os }}-sbt- | ||
|
||
- name: Run Tests for Kafka 0.10.x, Java ${{ matrix.java }} and Scala ${{ matrix.scala }} | ||
run: sbt -J-Xmx6144m kafka10/test | ||
|
||
- name: Run Tests for Kafka 0.11.x, Java ${{ matrix.java }} and Scala ${{ matrix.scala }} | ||
run: sbt -J-Xmx6144m kafka11/test | ||
|
||
- name: Run Tests for Kafka 1.x.x, Java ${{ matrix.java }} and Scala ${{ matrix.scala }} | ||
run: sbt -J-Xmx6144m kafka1x/test |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,7 @@ project/plugins/project/ | |
.scala_dependencies | ||
.worksheet | ||
.idea | ||
|
||
.bsp/sbt.json | ||
|
||
.DS_Store |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
version: '2' | ||
services: | ||
|
||
zookeeper: | ||
image: confluentinc/cp-zookeeper:4.1.1 | ||
hostname: zookeeper | ||
container_name: zookeeper | ||
ports: | ||
- "2181:2181" | ||
environment: | ||
ZOOKEEPER_CLIENT_PORT: 2181 | ||
ZOOKEEPER_TICK_TIME: 2000 | ||
|
||
broker: | ||
image: confluentinc/cp-server:5.5.0 | ||
hostname: broker | ||
container_name: broker | ||
depends_on: | ||
- zookeeper | ||
ports: | ||
- "9092:9092" | ||
environment: | ||
KAFKA_BROKER_ID: 1 | ||
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181' | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT | ||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092 | ||
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 | ||
KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 | ||
CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: broker:29092 | ||
CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper:2181 | ||
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1 | ||
CONFLUENT_METRICS_ENABLE: 'true' | ||
CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.3.3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
## Consumer Benchmarks | ||
|
||
The consumer benchmark covers the *manual* and *auto commit* consumer implementations of the different libraries. | ||
The manual commit will also cover producing committing back the consumed offsets. | ||
It also runs on different range `pollHeartbeatRate` [1, 10, 15, 100, 1000], which is an important configuration | ||
implemented in this `monix-kafka` library. | ||
|
||
## RC7 | ||
### 1fork 1thread | ||
Benchmark Mode Cnt Score Error Units | ||
ConsumerBenchmark.monix_auto_commit_async thrpt 7 13.097 ± 0.827 ops/s | ||
ConsumerBenchmark.monix_auto_commit_sync thrpt 7 12.486 ± 1.087 ops/s | ||
ConsumerBenchmark.monix_manual_commit thrpt 10 11.519 ± 2.247 ops/s | ||
|
||
### 1 fork 3 threads | ||
Benchmark Mode Cnt Score Error Units | ||
ConsumerBenchmark.monix_auto_commit thrpt 10 16.186 ± 0.920 ops/s | ||
ConsumerBenchmark.monix_manual_commit thrpt 10 16.319 ± 1.465 ops/s | ||
|
||
## RC8 - (Introduces PollHeartbeatRate) | ||
### 1fork 1thread | ||
--- | ||
Benchmark Mode Cnt Score Error Units | ||
ConsumerBenchmark.monixAsyncAutoCommitHeartbeat15ms thrpt 7 13.126 ± 1.737 ops/s | ||
ConsumerBenchmark.monixSyncAutoCommitHeartbeat15ms thrpt 7 12.102 ± 1.214 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat1000ms thrpt 7 2.978 ± 0.006 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat100ms thrpt 7 9.961 ± 1.317 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat10ms thrpt 7 13.346 ± 0.716 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat15ms thrpt 7 13.454 ± 2.680 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat1ms thrpt 7 14.281 ± 1.591 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat50ms thrpt 7 11.900 ± 0.698 ops/s | ||
--- | ||
### 1 fork 3 threads | ||
Benchmark Mode Cnt Score Error Units | ||
ConsumerBenchmark.monixAsyncAutoCommitHeartbeat15ms thrpt 7 16.966 ± 2.659 ops/s | ||
ConsumerBenchmark.monixSyncAutoCommitHeartbeat15ms thrpt 7 15.083 ± 4.242 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat1000ms thrpt 7 2.978 ± 0.006 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat100ms thrpt 7 9.961 ± 1.317 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat10ms thrpt 7 13.346 ± 0.716 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat15ms thrpt 7 13.454 ± 2.680 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat1ms thrpt 7 14.281 ± 1.591 ops/s | ||
ConsumerBenchmark.monixManualCommitHeartbeat50ms thrpt 7 11.900 ± 0.698 ops/s | ||
|
||
```sbt | ||
sbt 'benchmarks/jmh:run -i 5 -wi 1 -f1 -t1 monix.kafka.benchmarks.ConsumerBenchmark.*' | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Producer benchmarks | ||
|
||
This section includes benchmarks for single and sink producers. | ||
|
||
## RC7 | ||
|
||
### 10iterations 1fork 1thread | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we compare results of the same fork / threads setup? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep they should, will address that, although I think I just added them more as a base for future api changes since the producer logic was untouched. |
||
Benchmark Mode Cnt Score Error Units | ||
ProducerBenchmark.monix_single_producer thrpt 3 0.504 ± 0.668 ops/s | ||
ProducerBenchmark.monix_sink_producer thrpt 3 1.861 ± 5.475 ops/s | ||
|
||
## RC8 | ||
|
||
### 10iterations 1fork 3threads | ||
Benchmark Mode Cnt Score Error Units | ||
ProducerBenchmark.monix_single_producer thrpt 10 0.981 ± 0.202 ops/s | ||
ProducerBenchmark.monix_sink_producer thrpt 10 3.241 ± 0.191 ops/s |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<configuration> | ||
|
||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
<Pattern> | ||
%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n | ||
</Pattern> | ||
</layout> | ||
</appender> | ||
|
||
<logger name="monix.kafka" level="info" additivity="false"> | ||
<appender-ref ref="CONSOLE"/> | ||
</logger> | ||
<logger name="org.apache.kafka" level="error" additivity="false"> | ||
<appender-ref ref="CONSOLE"/> | ||
</logger> | ||
<logger name="org.apache.zookeeper" level="error" additivity="false"> | ||
<appender-ref ref="CONSOLE"/> | ||
</logger> | ||
|
||
<root level="warn"> | ||
<appender-ref ref="CONSOLE"/> | ||
</root> | ||
|
||
</configuration> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package monix.kafka.benchmarks | ||
|
||
import monix.eval.Coeval | ||
|
||
import scala.util.Random | ||
|
||
trait BaseFixture { | ||
protected val brokerUrl = "127.0.0.1:9092" | ||
protected val randomId: Coeval[String] = Coeval(Random.alphanumeric.filter(_.isLetter).take(20).mkString) | ||
protected val monixTopic = "monix_topic" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this one should be RC7 and
Version 1.0.0-RC7 (April 18, 2020)
below should be removedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected, sorry I only intended to add the entry for RC7 that was missing.