EdColeman commented on a change in pull request #1688:
URL: https://github.com/apache/accumulo/pull/1688#discussion_r474183577



##########
File path: 
server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java
##########
@@ -104,28 +105,27 @@ public void run() {
     Span findWalsSpan = Trace.start("findReferencedWals");
     HashSet<String> closed = null;
     try {
-      sw.start();
+      startTime = System.nanoTime();
       closed = getClosedLogs(conn);
+      duration = Duration.ofNanos(System.nanoTime() - startTime);
     } finally {
-      sw.stop();
       findWalsSpan.stop();
     }
 
-    log.info("Found " + closed.size() + " WALs referenced in metadata in " + 
sw.toString());
-    sw.reset();
+    log.info("Found " + closed.size() + " WALs referenced in metadata in " + 
duration);

Review comment:
       Probbaily just a nit, but does changing the output format matter?  
Duration will print out like: PT0.021850552S , Stopwatch is more "user" 
friendly with "333.2 ms"
   
   Also, maybe unrelated by anything other than name, but there is a StopWatch 
class in org.apache.accumulo.core.util - it seems to be referenced only in 
org.apache.accumulo.server.client.BulkImporter.
   
   




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to