Forum Discussion

pkeairnes's avatar
New Contributor
14 years ago

How to profile just a few .NET Framework classes

Is it possible to enable profiling of my application plus a .NET Framework class such as System.Text.RegularExpressions.Regex without incurring the cost of profiling every .NET Framework class? I have tried various combinations of adding the System.dll assembly, creating include/exclude areas, but I cannot figure out how to add just a few hand-picked framework classes to my profile.

2 Replies

  • Hi Piper,

    Could you please explain what you need to profile the standard .NET Framework class for?

  • pkeairnes's avatar
    New Contributor
    Never mind, I figured it out. My mistake was in understanding how the preset Area named "Full Check by Routines" worked. When I added the "System.dll" assembly to the Setup panel, it
    was being profiled because "Full Check by Routines" was still checked. I
    needed to uncheck the "Full Check" Area and create my own Include area where I explicitly included only the bits that I wanted to profile.

    For anyone else who finds this and wants to add a subset of the .NET BCL to your profiling:

    1) Uncheck all Areas.

    2) Add a new Area with Type of Including.

    3) Click the Add Assembly button in the Setup tab, then select the "System" assembly, click OK.

    4) In the Setup tab, browse the System.dll and right-click the namespace/class/method that you want to profile, then choose Add to Selected Area, and select the area you created in Step 2.

    5) Repeat Steps 3 and/or 4 to add any other desired .NET BCL subsets.

    6) Use Add Module to add your own dll/exe files to the same Including Area.

    7) Run... and now you are profiling your code plus only the .NET BCL classes that you are interested in.