Skip to content

Commit

Permalink
Add missing addRequestStats
Browse files Browse the repository at this point in the history
  • Loading branch information
gavingaozhangmin committed Jun 28, 2023
1 parent 147b5bf commit d222a80
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ public void writeComplete(int rc, long ledgerId, long entryId,
requestHandler.prepareSendResponseV2(rc, request);
requestProcessor.onAddRequestFinish();

if (BookieProtocol.EOK == rc) {
requestProcessor.getRequestStats().getAddRequestStats().registerSuccessfulEvent(
MathUtils.elapsedNanos(enqueueNanos), TimeUnit.NANOSECONDS);
} else {
requestProcessor.getRequestStats().getAddRequestStats().registerFailedEvent(
MathUtils.elapsedNanos(enqueueNanos), TimeUnit.NANOSECONDS);
}
request.recycle();
recycle();
}
Expand Down

0 comments on commit d222a80

Please sign in to comment.