Browse Source

MINOR: Record all poll invocations (#9234)

Record the pollSensor after every invocation to poll, rather than just when we get records back so that we can accurately gauge how often we're invoking Consumer#poll.

Reviewers: Bruno Cadonna <bruno@confluent.io>, Guozhang Wang <guozhang@apache.org>, Matthias J. Sax <mjsax@apache.org>
pull/9252/head
John Roesler 4 years ago committed by GitHub
parent
commit
9c8501f5f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java

2
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java

@ -636,8 +636,8 @@ public class StreamThread extends Thread { @@ -636,8 +636,8 @@ public class StreamThread extends Thread {
final long pollLatency = advanceNowAndComputeLatency();
pollSensor.record(pollLatency, now);
if (records != null && !records.isEmpty()) {
pollSensor.record(pollLatency, now);
pollRecordsSensor.record(records.count(), now);
taskManager.addRecordsToTasks(records);
}

Loading…
Cancel
Save