I'm using mvc-mini-profiler along with Glimpse. The problem is glimse is flooding the profiler output with glimpse requests. Is there any way to ignore all request made by glimpse ?
We have been using MiniProfiler in MVC projects to detect the performance of the queries called in the server. The number of requests made by the browser to the server, the response time and many other options a developer would get using these extensions. Glimpse is a new platform for developers to judge their applications.
In this article, we will be using ASP.Net MVC for demonstrating the Glimpse usage. Glimpse is just like Chrome developer tool/Firebug for our server. The dictionary** definition of Glimpse is that it is a momentary or partial view, thus it gives us a glimpse at the inner workings of ASP.Net applications.
The following commands install Glimpse MVC5 and EF6 modules from the package manager console: Navigate to http://localhost:<port #>/glimpse.axd and click the Turn Glimpse On button. If you have your favorites bar displayed, you can drag and drop the Glimpse buttons and add them as bookmarklets:
Note: <mini-profiler> has many options like max-traces, position, color-scheme, nonce, etc. You can find them in code here. Note #2: The above tag helper registration may go away in future versions of ASP.NET Core, they’re working on smoother alternatives here.
protected void Application_Start()
{
var ignored = MiniProfiler.Settings.IgnoredPaths.ToList();
ignored.Add("Glimpse.axd");
MiniProfiler.Settings.IgnoredPaths = ignored.ToArray();
}
Solution Posted here: Mini MVC profiler: appears to be displaying profile times for every static resource
At the moment Glimpse will make Ajax requests if you have the Remote tab selected or when ever an Ajax request is made by your site.
This is done because when we detect that a request is made we proactively get the Glimpse data. We could probably switch this in a future release to be more lazy and only fetch the data on request.
Note, even though this will help, Glimpse will still be calling back to the server in the same way that Mini Profile does. Hence, both frameworks could probably try and ignore each other for ajax requests.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With