DomGarguilo commented on code in PR #6041:
URL: https://github.com/apache/accumulo/pull/6041#discussion_r2673088768
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java:
##########
@@ -447,15 +449,15 @@ private void flush(UpdateSession us) {
us.totalUpdates += mutationCount;
}
- private void updateAverageLockTime(long time, TimeUnit unit, int size) {
+ private void updateAverageLockTime(Duration duration, int size) {
if (size > 0) {
- server.updateMetrics.addLockTime((long) (time / (double) size), unit);
+ server.updateMetrics.addLockTime(duration.dividedBy(size));
Review Comment:
In my opinion the simpler code is worth it here. Especially since this is
just metrics collection and I think its converted to a Duration internally
anyways down the line
--
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]