Changeset 500e4520742496029c58575c4a5ecb915bdc3950

Show
Ignore:
Timestamp:
07/14/10 05:17:04 (7 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1279084624 +0000
git-parent:

[476dcdcc68bd8c8f7fc3c5374dbf660010e97f75]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1279084624 +0000
Message:

add timing logs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/java/com/omniti/reconnoiter/event/NoitMetric.java

    ra7f2158 r500e452  
    1313import com.omniti.reconnoiter.event.NoitMetricNumeric; 
    1414import com.omniti.reconnoiter.event.NoitMetricText; 
     15import org.apache.log4j.Logger; 
    1516 
    1617public class NoitMetric extends NoitEvent { 
     18  static Logger logger = Logger.getLogger(NoitMetric.class.getName()); 
    1719  public final static String METRIC_STRING = "s"; 
    1820 
     
    3335  } 
    3436  public void handle(EventHandler eh) { 
     37    long start = System.nanoTime(); 
    3538    if(nmn != null) eh.getService().getEPRuntime().sendEvent(nmn); 
    3639    if(nmt != null) eh.getService().getEPRuntime().sendEvent(nmt); 
     40    long nanos = System.nanoTime() - start; 
     41    logger.debug("sendEvent("+getUuid()+"-"+getName()+") took "+(nanos/1000)+"us"); 
    3742  } 
    3843  public String getUuid() {