View the la MiniProfiler user guide?

I am looking at runtime profiling tools for a web application (WebForms).

I reviewed MiniProfiler and Glimpse.

In MiniProfiler, itโ€™s easy (actually, the only way?) To log profiling messages:

var profiler = MiniProfiler.Current; using (profiler.Step("Doing complex stuff")) { using (profiler.Step("Step A")) { // something more interesting here Thread.Sleep(100); } using (profiler.Step("Step B")) { // and here Thread.Sleep(250); } } 

In Glimpse, you get automatic profiling for the query life cycle - but I'm not sure what the easiest way to profile custom business logic scripts is.

I read here that Glimpse supports System.Diagnostics.(Trace|Debug).Trace*() on the "Trace" tab, but it only indicates points in time, it does not look like nested profile areas, It would be nice to track user data more in a structured way โ€” for example, on the Timeline tab.

So the question is, can I (hopefully easily) get structured, customizable MiniProfiler logging in Glimpse?

PS. I know that the Glimpse extension is for displaying MiniProfiler data, but it looks like it's left.

SFC. I was pleasantly surprised to see Glimpse working (almost) out of the box in my WebForms project (in the classic IIS pipeline mode!). AFAIK, MiniProfiler doesnโ€™t work well with this configuration; it is skewed towards MVC.

+5
source share
1 answer

Unfortunately, Glimpse, since version 1.8.6 (the main package), does not support this.

Technically, you can easily write an extension that does this, but its such a general request that we add it to the next version. It is actually already registered at http://getglimpse.com/Docs/Timeline-Tab .

You can also just grab the code or GlimpseTimeline from our GitHub repo and make it work in the current version according to your needs.

+3
source

Source: https://habr.com/ru/post/1209560/


All Articles