smattheis commented on a change in pull request #18991:
URL: https://github.com/apache/flink/pull/18991#discussion_r820793763
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/MailboxProcessor.java
##########
@@ -175,6 +199,7 @@ public void close() {
public void drain() throws Exception {
for (final Mail mail : mailbox.drain()) {
mail.run();
+ mailboxThroughputMeter.markEvent();
Review comment:
That means to not use an existing Metrics implementation and to come up
with some implementation that calculates the throughput.
How about making MeterView#markEvent and SimpleCounter#inc final? (I think
that would avoid virtual method dispatching, right?)
``` java
@Override
public void markEvent() {
this.counter.inc();
}
```
``` java
@Override
public void inc() {
count++;
}
```
Final should be fine for both methods since (1) no class inherits from
MeterView and (2) the only class that inherits from SimpleCounter, which is
SumCounter, does not override inc method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]