MINOR: Record all poll invocations
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 Guozhang Wang Matthias J. Sax
@@ -636,8 +636,8 @@ public class StreamThread extends Thread {
final long pollLatency = advanceNowAndComputeLatency();
- if (records != null && !records.isEmpty()) {
pollSensor.record(pollLatency, now);
+ if (records != null && !records.isEmpty()) {
pollRecordsSensor.record(records.count(), now);
taskManager.addRecordsToTasks(records);
}
