mishrsud / mvc-mini-profiler

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

Multi-threaded support #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently MiniProfiler only works from a single thread because of the shared 
stack. I am trying to time substeps inside of a PLinq query. Ideally it would 
be possible to use the same profiler to capture the overall runtime as well as 
the timing of each parallel substep. Any suggestions for addressing this?

Example:

MiniProfiler p = ...;

using (p.Step("Parallel Query")) 
{
    values.AsParallel().Select(v => 
    {
        using(p.Step("Value " + v)) 
        {
            return DoSomethingWithV(v);
        }
    }).ToArray();
}

Original issue reported on code.google.com by mbe...@gmail.com on 3 May 2011 at 4:01

GoogleCodeExporter commented 8 years ago
This is non-trivial on a number of levels, not least we have no sensible way of 
displaying that information (or, indeed, tracking it).

This is not something I propose that we investigate at this time.

Original comment by marc.gravell on 14 Jun 2011 at 10:42