[ 
https://issues.apache.org/jira/browse/METRON-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16099883#comment-16099883
 ] 

ASF GitHub Bot commented on METRON-1060:
----------------------------------------

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.


> Add performance timing logging to enrichment topology
> -----------------------------------------------------
>
>                 Key: METRON-1060
>                 URL: https://issues.apache.org/jira/browse/METRON-1060
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Michael Miklavcic
>            Assignee: Michael Miklavcic
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to