Time Your Code

Sometimes you might add in some custom code or calls to another service in your JSP, and experience performance issues.

To help diagnose these cases, Appkit has a custom tag that lets you time different parts of you page, outputting timing results in the Appkit logs.

How to time your code
  1. Add this tag around the code that you want to time:

    <search:timer label=“My task”>
        // actual code to measure goes here
  2. Set your logback.xml to TRACE:

    <logger name="twigkit" level="TRACE" />
  3. Restart your app.

    When you run the JSP in question, you will see times appear in the logs like: "My task rendered in 198 ms."