Control when profiling begins

I am currently using ANTS Performance Profiler V4.3.0.198.

There is no control in this version to select assemblies for profiling, or to launch the application and not begin profiling until a certain point. Since our application is large it can take up to 20 minutes when running within the profiler to get to the point where I'm interested in profiling.

The ability to attach to an already running process, or launch from the profiler with profiling disabled and then enable when ready _is highly desirable_. Has this feature been implemented in the latest version?

Comments

  • Hi,

    Attach to a .Net 4 process is a feature of the current version.


    Regards,
    Dene.
    Dene Boulton
    Red Gate
  • Another new feature of the later versions is a sampling profiler - in this mode the overhead of the profiler is low enough that it can be considered to be effectively nonexistent in most cases.

    In the instrumentation modes, which capture the most detail, there's effectively no way to turn the profiler on or off: once the JIT has done its work, the instrumentation is in place and can't be changed. Additionally, the profiler would still need to track program state even when it was not measuring timings, which means the main effect of having an 'on/off' switch would be to make the profiler run slower (with the switch in either state). The best way to improve performance is to turn down the amount of instrumentation that is performed - in particular, line-level timings can require a lot of processor time to deal with.

    Most profilers have an on/off switch in any case to make it possible to limit the final results to a specific time period. ANTS doesn't need this because it has the timeline and the ability to return profiler results for any time period by dragging out a region, so it's possible to just ignore the results from uninteresting times and easy to look at many different areas of the program in a single run.

    This is particularly aimed at applications with long setup times: it means that it's not possible to make a mistake that would result in the interesting part of the data being lost, and also makes it easy to take a peek at the early data to ensure that the profiler is indeed capturing what's required.
    Andrew Hunter
    Software Developer
    Red Gate Software Ltd.
Sign In or Register to comment.