Workbrain System Performance and the Timing Monitor Diagnostic Tool

When creating enterprise software that will need to handle thousands of transactions in near real time, performance of code becomes very important. There are many third party tools that can help analyze code performance, but I liked to focus on one that is built into Workbrain today called the Timing Monitor.

The Timing Monitor is a JAMON based performance monitor that, when enabled, automatically tracks pay rules, conditions, and interfaces based on their name like so:



You can easily see which conditions are used the most in the Hits column. The Hits column is often dictated by your configuration, but the Avg Ms. column provides the substance for our performance analysis. I won't provide a specific value, since performance analysis is often an art over a science, but when this value is significantly higher than the others, this provides you a hint for where to look for possible performance issues.

The Timing Monitor is lightweight enough to use in production for temporary periods. Even in our volume tests, it never exceeded 5% overhead. You can access this tool at Maintenance > System Administration > Diagnostic Tools > System Metrics > Timing Monitor.

You can also track your own code through this page using the JAMON API. Create a class similar to below and make use of the startTimer() and stopTimer() methods in your own code:

import com.workbrain.util.monitor.WBMonitorFactory;

public class MyObject {

     private Monitor methodMonitor;

     public void helloWorld() {
        startTimer("MyObject.helloWorld");
        //do stuff
        ...        stopTimer();
     }

     protected void startTimer(String eventToTime) {
        if (WBMonitorFactory.isMonitorEnabled())  {      
            if(methodMonitor != null) {
                methodMonitor.stop();
            }
            methodMonitor = WBMonitorFactory.start(eventToTime);
        }
     }

     protected void stopTimer() {
        if (WBMonitorFactory.isMonitorEnabled())  {
            if(methodMonitor != null) {
                methodMonitor.stop();
                methodMonitor = null;
            }
        }
     }

}

Have you used this tool? What performance issues did you find and how will you fix them?

1 comments:

aaronnssd said...

I admire this article for the well-researched content and excellent wording. Read more info about obd2 diagnostic tool. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.

Post a Comment