Github user justinleet commented on a diff in the pull request:

    https://github.com/apache/metron/pull/665#discussion_r129279181
  
    --- Diff: 
metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/GenericEnrichmentBolt.java
 ---
    @@ -179,6 +180,7 @@ public void declareOutputFields(OutputFieldsDeclarer 
declarer) {
       @SuppressWarnings("unchecked")
       @Override
       public void execute(Tuple tuple) {
    +    long texecute1 = System.currentTimeMillis();
    --- End diff --
    
    I don't know if we actually care given that it's logging, but iirc 
`currentTimeMillis()` returns can differ based on ntp syncs and so on (end time 
can be before start time, for example).  `nanotime()` is generally more 
reliable for this, but it can also be more expensive (on the order of millis).
    
    Even with `currentTimeMillis()`, I think the actual call can still end up 
being slow (milli+ depending on the system).  It might be worthwhile to wrap 
the timing calls in a debug guard given that these run in the `execute()`, but 
I'm not sure if it'll make a difference in practice.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to