Possible to add "offline profiling" functionality to my application?

Being a long time user of Red Gate's ANTS Performance Profiler, I'm currently searching for a way to do profiling on non-development machines.

We have a rather large user base of a WinForms application, written in .NET 4.

Users every now and then complain about poor performance.

Since I cannot buy and install ANTS on every customer's PC, I'm thinking about something like:

  1. Add some magic code to my application that uses the .NET Profiling API.
  2. Provide a switch in my application to enable profiling tracing.
  3. Tell the user to activate the switch.
  4. Let the API record performance "events" for some time.
  5. Tell the customer to ship me the recorded logs.
  6. Open the logs in some fancy GUI to analyse the hotspots.

My question:

Is it somehow possible to use the .NET profiling API to include offline performance hotspot recording to analyse later on?

Update 1:

I've just found the "dotTrace Perfomance API" which introduces the term self-profiling which seems to be just what I'm looking form.

Checking the article now…


Yes, dotTrace API seems to be the best solution. Actually, you can use the same approach as JetBrains uses for ReSharper. There is the option in the ReSharper's Help menu - Profile Visual Studio. What this menu does is run self-profiling. When a user faces a slowdown, JB support asks him to use this menu and reproduce the issue. The collected performance snapshot is then sent to JetBrains.

Need Your Help

Bring local site to live site url not working

php html mysql css drupal-7

I have developed a site using drupal 7. I have moved my site from local server to live server.

Only execute script if entered email is from a specific domain

php regex preg-match

I am trying to create a script that will only execute its actions if the email address the user enters is from a specific domain. I created a regex that seems to work when testing it via regex uti...