Skip to content

Commit

Permalink
HADOOP-19361. RPC DeferredMetrics bugfix. (#7220). Contributed by hfu…
Browse files Browse the repository at this point in the history
…tatzhanghb.

Reviewed-by: Jian Zhang <keepromise@apache.org>
  • Loading branch information
hfutatzhanghb authored and KeeProMise committed Feb 14, 2025
1 parent 8b9a9c3 commit 1fbc8f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public Message invoke(Object proxy, final Method method, Object[] args)
throws ServiceException {
long startTime = 0;
if (LOG.isDebugEnabled()) {
startTime = Time.now();
startTime = Time.monotonicNow();
}

if (args.length != 2) { // RpcController + Message
Expand Down Expand Up @@ -267,7 +267,7 @@ public Message invoke(Object proxy, final Method method, Object[] args)
}

if (LOG.isDebugEnabled()) {
long callTime = Time.now() - startTime;
long callTime = Time.monotonicNow() - startTime;
LOG.debug("Call: " + method.getName() + " took " + callTime + "ms");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public Message invoke(Object proxy, final Method method, Object[] args)
throws ServiceException {
long startTime = 0;
if (LOG.isDebugEnabled()) {
startTime = Time.now();
startTime = Time.monotonicNow();
}

if (args.length != 2) { // RpcController + Message
Expand Down Expand Up @@ -278,7 +278,7 @@ public Message invoke(Object proxy, final Method method, Object[] args)
}

if (LOG.isDebugEnabled()) {
long callTime = Time.now() - startTime;
long callTime = Time.monotonicNow() - startTime;
LOG.debug("Call: " + method.getName() + " took " + callTime + "ms");
}

Expand Down

0 comments on commit 1fbc8f9

Please sign in to comment.