szetszwo commented on code in PR #855:
URL: https://github.com/apache/ratis/pull/855#discussion_r1136640165


##########
ratis-server/src/main/java/org/apache/ratis/server/metrics/SegmentedRaftLogMetrics.java:
##########
@@ -155,8 +155,8 @@ public void onRaftLogAppendEntry() {
     appendEntryCount.inc();
   }
 
-  public UncheckedAutoCloseable startAppendEntryTimer() {
-    return Timekeeper.start(appendEntryTimer);
+  public Timekeeper getAppendEntryTimer() {
+    return appendEntryTimer;

Review Comment:
   Let's ~~keep~~ return `Timekeeper.Context`.
   ```java
     public Timekeeper.Context startAppendEntryTimer() {
       return appendEntryTimer.time();
     }
   ```



-- 
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]

Reply via email to