The mvc-mini-profiler is a lightweight, but effective mini profiler tool for ASP.NET apps specially designed for ASP.NET MVC 3 apps. The mvc-mini-profiler is an free and open source tool from Stack Overflow team. The tool is initially developed for StackOverflow family of websites and open sources the tool later. This is an another great open source tool from Stack Overflow team after Dapper object mapper for .Net. The mvc-mini-profiler is available from http://code.google.com/p/mvc-mini-profiler/ . The mvc-mini-profiler is also available as a NuGet package .
How to using mvc-mini-profile
Add reference to MvcMiniProfiler. You can use NuGet to add reference to MvcMiniProfiler
Start the mini profiler when you want to start profiling
The below code block of the Application_BeginRequest event will start profiling if the request is from local computer
Do the profiling when you want to perform profiling
Stop the mini profiler when you want to stop it
The above code stops the mini profiler in the Application_EndRequest() event.