Performance Profiling a SharePoint 2010 Project using EQATEC Profiler

I wanted to profile a SharePoint 2010 project i’d been working on, in order to find some of the slower methods so that they could be improved.  I decided to give EQATEC Profiler a try since it had some good recommendations on StackOverflow and was FREE.

EQATEC works by modifying and rebuilding your assemblies.  Since I use Visual Studio 2010′s built in package and deployment features, it needs to be run after the build, but before the project is packaged and deployed to the SharePoint server.

Here’s how I got it working:

  1. Start EQATEC Profiler. Under ‘Application to profile’ select your project’s bin\debug folder. Check-mark all of the assembly’s you would like to profile.
  2. Click ‘Build’.  This will rebuild the project with added profiling bits, as well as add ‘app.eqconfig’ and ‘EQATEC.Profiler.RuntimeFullNet.dll’ to your output folder.
  3.  The EQATEC assembly needs to be added to your project’s package for it to function properly.
    • Open your project in Visual Studio 2010.
    • Open your project’s package and click on the ‘Advanced’ tab.
    • Click ‘Add’ -> ‘Add Existing Assembly…’. Browse and select ‘EQATEC.Profiler.RuntimeFullNet.dll’ from your bin\debug folder.
    • You can leave the default location and selection of ‘Global Assembly Cache’.
    • Click OK.
    • Save the package.



  4. Open the project properties and select the ‘Build Events’ tab.  Add the following command to the Post-Build Commands:
    "C:\Program Files (x86)\EQATEC\EQATECProfiler\EQATECProfilerCmd" -build app.eqconfig

    This will cause your assemblies to be recompiled with EQATEC once the standard build is done.

  5. Deploy your project to SharePoint.
  6. Exercise your project in SharePoint.
  7. In EQATEC, click on the Run tab.  You should see messages that your profiled application has started.
  8. Once SharePoint has “warmed up” and your project is performing normally, click the ‘Reset Counters’ button in EQATEC.  This will reset the profiling so that you can begin collecting data.
  9. Exercise your project in SharePoint. Make sure you exercise all code you’d like profiled.
  10. Back in EQATEC, click the ‘Take Snapshot’ button.  This will create a report of your profiling session.
  11. Under ‘View snapshot reports’ double-click on the report you’d like to view.  This will open the view tab, where you can explore the results of your profiling session and find the slower methods in your project.
  12. Don’t forget when you’re done profiling to remove the EQATEC assembly from your package as well as remove the post-build step.  Leaving them in will decrease your project’s performance.

2 Responses to “Performance Profiling a SharePoint 2010 Project using EQATEC Profiler”

  1. Singh says:

    How about Sandbox solutions? I couldn’t get this to work on Sandbox solutions.

Leave a Response

Current day month ye@r *

Trackbacks