.NET Profilers are developers’ best friends because when it comes to optimizing application performance. They are especially critical when doing low level CPU and memory optimization. But did you know that there are three different types of profilers?
- Traditional .NET profilers that track process memory usage, time spent per line of code and frequency of method calls.
- Lightweight profilers or other tracing mechanisms that allow you to logically understand what your code is doing and understand performance at a high level.
- Application performance management (APM) tools designed to monitor production servers.
All are very valuable but serve relatively different purposes and different types of performance profiling.
STANDARD .NET PROFILERS:
These tools include CLR profiler products like Visual Studio’s .NET profiler, ANTS, dotTrace, SciTech and YourKit.Most likely if you are using a profiler of some form, you are having a bad day. It usually means you are chasing some bad CPU or memory usage problems. I’ve had my fair share of multi-day marathon profiling sessions trying to find obscure memory leaks. These tools are a lifesaver when you need them, but they are very resource intensive and slow you down when using them. I would venture to guess that the vast majority of developers have never or very rarely use these types of profilers. These simply aren’t needed day to day for apps that a lot of developers create.
LIGHTWEIGHT .NET PROFILER/TRANSACTION TRACING TOOLS:
Lightweight profilers are more efficient towards performance of your app. They help you understand total page load time, which database calls were executed, etc.
PROFILING PRODUCATION .NET APPLICATIONS (APM) :
These tools include products like New Relic, AppDynamics, Stackify Retrace, Dynatrace, and others.Normal profilers are designed as developer tools that are used on their workstations. The same sort of technology is used on servers but must be very lightweight so it doesn’t slow down production applications. Stackify’s Retrace APM and Prefix use the same exact lightweight profiling technology for both. The other key feature for profiling production apps is aggregating performance details across all transactions, app, and servers so you can easily understand application performance