1. Before use, you need to confirm the framework version, if it is 4.0 then use the following assembly to
In the project that created Isessionfactory, reference the Nhprofiler installation directory under the
HibernatingRhinos.Profiler.Appender.v4.dll
2. Before creating the Isessionfactory statement (new Configuration ()). Configure (). Buildsessionfactory ();) Insert the following code
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize ()
3. Then open the Nhprofiler tool, run the project, the left side will show all the nhibernate session, the right side will show the corresponding session of the detailed SQL statement
Note: Nhprofiler is a tool for running analysis on NHibernate
Introduction
NHibernate Profiler is a real-time visual debugger allowing a development team to gain valuable insight and perspective in To their usage of NHibernate. The product is architected with input coming from many top industry leaders within the NHibernate community. Alerts is presented in a concise code-review manner indicating patterns of misuse by your application. To streamline your efforts to correct the misuse, we provide links to the problematic code sections that triggered the Aler T
- Cognitive application awareness.
- Visual insight into the interaction between your database and application code.
- Analysis and detection of common pitfalls when using NHibernate.
- Analysis is delivered via perfectly styled SQL and linkable code execution.
- Supports NHibernate 1.2.x, 2.x and 3.x
: Http://www.hibernatingrhinos.com/products/nhprof
NHibernate Tool Profiler Configuration