mishrsud / mvc-mini-profiler

Automatically exported from code.google.com/p/mvc-mini-profiler
0 stars 0 forks source link

Allow "cumulative" entries, so that the total time of x small calls is recorded instead of individually #85

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Pretty much as the summary says, this would be very useful in a situation we 
have around serialization and caching.

Essentially, the bottleneck we have is that although all of our backend calls 
are cached (in process and in memcache) we must deserialize cached objects many 
many times over for practically every back end call. Individually these are 
negligible, but we would like to track how much time overall is spent doing 
this.

So doing the usual:

using(MiniProfiler.Current.Step("Retrieve cached object", 
MvcMiniProfiler.ProfileLevel.Info))
{
...
}

Will not cut it, as we will just get 100s of individual calls. We would prefer 
to do something like:

using(MiniProfiler.Current.Step("Retrieve cached object", 
MvcMiniProfiler.ProfileLevel.Info, Cumulative = true))
{
...
}

And have the output something like:

  BaseHttpApplication.BeginRequest   0.1    +0.2
   GlobalApplication.SelectCulture   0.2    +0.4
  GlobalApplication.AuthenticateRequest  0.1    +0.7
  StandardPage.PreInit                   1.2    +1.6
   BasePage.PreInit          0.6    +2.7
  BasePage.Init              0.0    +5.7
  StandardPage.PreLoad           0.2    +5.7
   BasePage.PreLoad          0.2    +5.7
  BasePage.Load              55.1   +6.2
  BasePage.PreRender             0.0    +71.7
  BaseHttpApplication.EndRequest     0.0    +83.3

====

  Retrieve Cached Object (Cumulative)   50.0    (121 occurrences)

Is there any appetite for a feature like this or any advice? I am considering 
adding this myself.

Thanks.

Original issue reported on code.google.com by m...@kieranbenton.com on 4 Aug 2011 at 11:12

GoogleCodeExporter commented 8 years ago
And apologies, but I can't see how to classify this as an "Enhancement 
Request", not much of a google code user!

Original comment by m...@kieranbenton.com on 4 Aug 2011 at 11:13

GoogleCodeExporter commented 8 years ago

Original comment by nrcraver on 14 Aug 2011 at 12:58

GoogleCodeExporter commented 8 years ago
What do you use to retrieve the set of cached items, and couldn't you just wrap 
that in a @using?

Original comment by james.f....@gmail.com on 24 Aug 2011 at 6:40