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:
- Add some magic code to my application that uses the .NET Profiling API.
- Provide a switch in my application to enable profiling tracing.
- Tell the user to activate the switch.
- Let the API record performance "events" for some time.
- Tell the customer to ship me the recorded logs.
- Open the logs in some fancy GUI to analyse the hotspots.
Is it somehow possible to use the .NET profiling API to include offline performance hotspot recording to analyse later on?
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.