List of usage examples for org.springframework.web.context.support RequestHandledEvent getProcessingTimeMillis
public long getProcessingTimeMillis()
From source file:org.springframework.web.context.support.PerformanceMonitorListener.java
public void onApplicationEvent(ApplicationEvent event) { if (event instanceof RequestHandledEvent) { RequestHandledEvent rhe = (RequestHandledEvent) event; this.responseTimeMonitor.recordResponseTime(rhe.getProcessingTimeMillis()); if (logger.isTraceEnabled()) { // Stringifying objects is expensive. Don't do it unless it will show. logger.trace("PerformanceMonitorListener: last=[" + rhe.getProcessingTimeMillis() + "ms]; " + this.responseTimeMonitor + "; client=[" + rhe.getClientAddress() + "]"); }//from ww w . j a va2 s . c o m } }