smiklosovic commented on code in PR #4021: URL: https://github.com/apache/cassandra/pull/4021#discussion_r2020937667
########## src/java/org/apache/cassandra/metrics/HintsServiceMetrics.java: ########## @@ -51,6 +62,12 @@ public final class HintsServiceMetrics .executor(ImmediateExecutor.INSTANCE) .build(address -> Metrics.histogram(factory.createMetricName("Hint_delays-"+address.toString().replace(':', '.')), false)); + public HintsServiceMetrics(HintsService hintsService) + { + hintsFileSize = Metrics.register(factory.createMetricName("HintsFileSize"), Review Comment: It seems like the only purpose of putting `hintsService` into the constructor is to get access to `getTotalHintsSizeOfNode` on it. We might go with parameter-less constructor instead and do `HintsService.instance::getTotalHintsSizeOfNode()` -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org