You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/07/07 07:48:50 UTC

[GitHub] [sling-org-apache-sling-scripting-core] bdelacretaz commented on pull request #8: SLING-10584 log an info message if adding bindings takes more than 1 msec

bdelacretaz commented on pull request #8:
URL: https://github.com/apache/sling-org-apache-sling-scripting-core/pull/8#issuecomment-875373107


   > ...true about the duplication, but I haven't found a good way to avoid it at all or where to put it...
   
   If there's no good place for that, I suggest a named constant in each class with a comment that mentions the duplication:
   
       // Note that this constant is duplicated in several source files
       public static final int WARN_IF_LONGER_THAN_NSEC = 1000 * 1000;
   
   My failure case is changing it one place and forgetting the others, which this avoids.
   
   > ...measuring the timing of some operation is a concern we have in many places, and for which we don't have a good overall solution...
   
   Agreed, there's probably a library or pattern for that out there...


-- 
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: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org