The NHibernate Profiler allows a developer to analyze the behaviors between the domain and data layer more effectively. If you are using NHibernate I think this piece of software should be in your arsenal of tools. Oh, and for you Java folks it works against Hibernate.
Session Filtering
Before I start the analysis notice to the left we have an unfiltered view of our current sessions. If you look a bit closer, you’ll notice that the recent statements list contains some added noise. To remedy this we will apply a filter to all session statements containing a url path for image,css and JavaScript files.
Locate the Filter component, in the upper right window of NH Profiler. By default filtering is Inactive. So lets define one custom to our session!
- Click on the filter icon and in the dropdown list of the Edit Filter window choose filtering for “Sessions by URL.
- Click the Add button.
- Choose the not containing operator.
- Enter the text for filtering. In my example I want to filter URL’s being sourced with the text '/Assets/’.
- Click apply.
And voila! we now have a more concise session list.
When the analysis is complex try to make it simpler with filters! In a future discussion we will look into how NH Prof can diff sessions and what insight we can gain from doing this.
No comments:
Post a Comment