I'm looking into runtime profiling tools for a (WebForms) web app.
I have considered 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 request lifecycle -- but I'm not sure what's the easiest way to profile custom business logic scenarios.
I read here that Glimpse supports System.Diagnostics.(Trace|Debug).Trace*()
in its 'Trace' tab, but that only shoows points in time, it doesn't seem to profile nested scopes. It would be nice to be able to trace custom data in a more structured way - for instance in the 'Timeline' tab.
So the question is, can I (hopefully easily) get MiniProfiler-like structured, custom logging in Glimpse?
PS. I know there's a Glimpse extension to display MiniProfiler data, but it looks like it's abandoned.
PPS. I was pleasantly surprised to see Glimpse work (almost) out of the box in my WebForms project (in IIS classic pipeline mode!). AFAIK, MiniProfiler doesn't play very nice with that configuration, it's skewed towards MVC.
Unfortunately, Glimpse, as of version 1.8.6 (of the core package) does not support this.
Technically your could easily write an extension that does this, but its such a common request that we are adding it in to the next release. It's actually already documented at http://getglimpse.com/Docs/Timeline-Tab.
You could also just grab the code or GlimpseTimeline
from our GitHub repo and get it working in the current version to fit your needs.
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