HADOOP-14893. WritableRpcEngine should use Time.monotonicNow. Contributed by Chetna Chaudhari.

This commit is contained in:
Akira Ajisaka 2017-09-26 16:45:39 +09:00
parent a2b31e355a
commit d08b8c801a
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50

View File

@ -231,7 +231,7 @@ public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
long startTime = 0;
if (LOG.isDebugEnabled()) {
startTime = Time.now();
startTime = Time.monotonicNow();
}
// if Tracing is on then start a new span for this rpc.
@ -251,7 +251,7 @@ public Object invoke(Object proxy, Method method, Object[] args)
if (traceScope != null) traceScope.close();
}
if (LOG.isDebugEnabled()) {
long callTime = Time.now() - startTime;
long callTime = Time.monotonicNow() - startTime;
LOG.debug("Call: " + method.getName() + " " + callTime);
}
return value.get();