reschke commented on code in PR #201:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/201#discussion_r2309776677


##########
src/main/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathHandler.java:
##########
@@ -746,10 +743,12 @@ private MapEntry createMapEntry(
 
     private Iterator<Resource> queryUnpaged(String query, ResourceResolver 
resolver) {
         log.debug("start vanity path query: {}", query);
-        long queryStart = System.nanoTime();
+        StopWatch sw = StopWatch.createStarted();
         final Iterator<Resource> it = resolver.findResources(query, 
"JCR-SQL2");
-        long queryElapsed = System.nanoTime() - queryStart;
-        log.debug("end vanity path query; elapsed {}ms", 
TimeUnit.NANOSECONDS.toMillis(queryElapsed));
+        log.debug(
+                "end vanity path query; elapsed {} ({}ms)",
+                sw.getDuration(),

Review Comment:
   a) You'll get accustomed at some point.
   
   b) To have less resistence to a)
   



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