In Q2 2011 we introduced the Profiling and Tuning advisor, which makes it easier than ever for developers using OpenAccess ORM to see what is going on behind the scenes. In this release we are happy to expand on the profiler by introducing improved UI features, and a new Metrics view.
The new view makes it easy for developers, and system administrators, to keep an eye on the health of an application. It displays metrics like committed transactions, rollbacks, connection pool health, and second level cache health. All of these metrics can be displayed with almost no performance impact on the application due to the way OpenAccess records, and reports, this information. Enough talk, Let’s take a look!
To use the new metrics view for an application, it must first be set up to work with the profiler. This is a very straight-forward process, but rather than covering it here, I will direct you to this documentation article; so you have the most up to date guide.
Once your application is configured, make sure to run it, and launch the OpenAccess Profiler and Tuning advisor.
Once the profiler opens, and you connect it with the application, you can access the new view in the upper right corner by clicking the Metric View button.
In this view, users are presented with charts showing a variety of information about what is going on in the data layer of their application. You can dig into an area of the current profiling session by adjusting the time bar at the top:
The first chart displays information about transactions executed during the current profiling session. As you can see in the above image, I have saved changes two times in the application I am profiling, this is indicated by the Commited data in the the chart. All of these were successful, and I can tell that because no Rollbacks have occurred.
The next chart is currently empty, however; if any errors SQL errors occurred in my application while I was profiling it, they would be displayed in the SQL Errors section.
The Connection Pool section shows me the health of my application’s connection pool. The connection pool is what OpenAccess uses to connect with the database backend. As you can see, I currently have no active connection. I do have two Checked Connections currently, which means that OpenAccess has validated that these connections are ready and able to connect to the database whenever it needs a connection.
The Context Pool section notifies me about how the contexts are behaving in my application. I can quickly see that my application has obtained many contexts during the profiling session. I can also see when they were obtained by looking at the Obtained data series, and the total number of active contexts by looking at the Max Active series.
The last two charts are extremely helpful for gaining valuable insight into the health of the OpenAccess L2 Distributed Cache. As you an see in the initial screen shot, I had not enabled the L2 cache. However, once I enable it, the charts spring to life and show me how the cache is performing:
The charts shows very little activity at the beginning of the profiling session, however; this is due to the initial queries going directly to the database and filling the L2 cache. Once the cache has been filled, the charts show that query results were returned directly from the L2 cache providing a significant performance boost to our application. Learn more about the L2 cache OpenAcces provides in this article.
Hopefully this brief overview of the new Metrics View helps you get started monitoring the health of applications using OpenAccess ORM. Make sure to stay tuned for more blogs about the great Q3 OpenAccess ORM features. Also, make sure to sign up for the Q3 release webinars to see all of the great new Q3 updates in action! :)
Ivailo Ivanov is Team Lead in Telerik Data Access
Subscribe to be the first to get our expert-written articles and tutorials for developers!