From 34cead356816ba1f2d299601004b0ac79b4a6805 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Mon, 2 Sep 2013 13:38:45 +0200 Subject: [PATCH] Add dispatching time spent. --- src/fr/devinsy/kiss4web/SimpleServletDispatcher.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java b/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java index 3106992..317e15e 100755 --- a/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java +++ b/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java @@ -10,6 +10,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.PrintWriter; +import java.util.Date; import java.util.regex.Matcher; 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 { + long startTime = new Date().getTime(); + logger.info("=================================================="); logger.info("getContextPath=[" + request.getContextPath() + "]"); 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()); } /**