xinglin commented on code in PR #5730:
URL: https://github.com/apache/hadoop/pull/5730#discussion_r1229947285
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java:
##########
@@ -636,10 +637,17 @@ void updateMetrics(Call call, long startTime, boolean
connDropped) {
processingTime -= waitTime;
String name = call.getDetailedMetricsName();
rpcDetailedMetrics.addProcessingTime(name, processingTime);
+ // Overall processing time is from arrival to completion.
+ long overallProcessingTime = rpcMetrics.getMetricsTimeUnit()
Review Comment:
the variable is used immediately at the following line and it is not used
anywhere else. I'd argue that it is fine to leave the TimeUnit out. It is clear
from the context that it has been converted to the correct timeUnit. Besides,
we have other four variables in this function which don't have timeUnit
appended to its variable names and we are just following the same convention
here.
@goiri, can we move forward with PR?
```
long overallProcessingTime = rpcMetrics.getMetricsTimeUnit()
.convert(completionTimeNanos - arrivalTimeNanos,
TimeUnit.NANOSECONDS);
rpcDetailedMetrics.addOverallProcessingTime(name, overallProcessingTime);
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]