【发布时间】:2015-03-07 14:48:23
【问题描述】:
我想计算我的 mule 流执行所需的执行时间,所以我使用了拦截器, 这是我的拦截器代码
class CustomLoggerInterceptor extends AbstractEnvelopeInterceptor {
@Override
public MuleEvent last(MuleEvent event, ProcessingTime time, long startTime,
boolean exceptionWasThrown) throws MuleException {
long totalTime=time.getStatistics().getTotalProcessingTime();
LOG.info("Start time for flow: "+event.getFlowConstruct().getName()+" is: "+startTime+" total execution time is: "+totalTime);
return event;
}
//other inherited methods
}
现在的问题是,每当我执行我的 mule 流程时,我从 time.getStatistics().getTotalProcessingTime() 获得的所有值始终是“0”。
是我使用了正确的方法还是我犯了一些错误?
我基本上需要一种从ProcessingTime 对象中查找执行时间的方法。
欢迎指点
谢谢!
【问题讨论】: