Add dispatching time spent.

This commit is contained in:
Christian P. MOMON 2013-09-02 13:38:45 +02:00
parent 4660a90686
commit 34cead3568

View file

@ -10,6 +10,7 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.Date;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -81,6 +82,8 @@ public class SimpleServletDispatcher extends HttpServlet
*/ */
public void dispatch(final HttpServletRequest request, final HttpServletResponse response, final String webClassesRootPath) throws IOException, ServletException public void dispatch(final HttpServletRequest request, final HttpServletResponse response, final String webClassesRootPath) throws IOException, ServletException
{ {
long startTime = new Date().getTime();
logger.info("=================================================="); logger.info("==================================================");
logger.info("getContextPath=[" + request.getContextPath() + "]"); logger.info("getContextPath=[" + request.getContextPath() + "]");
logger.info("getPathInfo=[" + request.getPathInfo() + "]"); logger.info("getPathInfo=[" + request.getPathInfo() + "]");
@ -177,6 +180,10 @@ public class SimpleServletDispatcher extends HttpServlet
*/ */
} }
} }
//
long endTime = new Date().getTime();
logger.debug("TIME: {}ms {}", endTime - startTime, request.getPathInfo());
} }
/** /**