Any decent C# profilers out there?

C#.NetProfilingProfiler

C# Problem Overview


I need a C# profiler.

Although I'm not averse to paying for one, something which is free or at least with a trial version would be ideal since it takes time to raise a purchase order.

Any recommendations?

C# Solutions


Solution 1 - C#

I used Ants profiler on a large c# project a year and a half ago. It really performed very nicely for what it cost, and even outperformed a few of the more expensive competitors.

It calculates cost on with almost a line by line resolution.

Solution 2 - C#

You can try the following:


Edit: Nprof has been replaced with SlimTune and works with .Net 4.0 applications

Solution 3 - C#

The EQATEC profiler is very good and is completely free. It's easy to setup and use, and doesn't seem to add too much of an overhead to the application. I've just started using it today and have already found a couple of bottlenecks I wouldn't have spotted otherwise.

Solution 4 - C#

dotTrace from JetBrains is widely used.

Patrick Smacchia's awesome NDepend is excellent for providing static analysis.

Solution 5 - C#

I maintain a comprehensive list of profilers for .NET on SharpToolbox.com.

You'll find there the tools suggested here and more, each with a short description of what it proposes.

Solution 6 - C#

We use Ants profiler where I work. It gives very detailed information in a simple manner.

Solution 7 - C#

It's interesting that no-one mentions that there's one in the higher-end versions of Visual Studio - I've always found that to be good enough for execution profiling. For memory profiling I use Memory Profiler which has already been mentioned, but isn't what I would generally describe as 'a profiler'.

What kind of profiling were you trying to do?

Solution 8 - C#

We use .NET Memory Profiler. Its kinda ugly but very useful for finding dangling references.

I originally tried Red Gate's ANTS profiler which is very sexy, but from a memory leak point of view it sucks for the following reasons:

  1. Its ridiculously slow. It was taking half an hour to get the application into a state to start recording (takes 20 seconds without red-gate).

  2. Red Gate needs to run its own tool on its own tool. It was using 900MB of memory by the time I finished two snapshots! It then crashed :(

However the timing component of Red Gate ANTS was impressive. Just don't bother with the memory profiler, unless you are dealing with a trivial (small footprint) application.

Solution 9 - C#

I have used AQtime and it has never let me down. I am sure there is a trial version.

Solution 10 - C#

I'll second red gate's ANTS profiler. I've used it to track down some really troubling performance issues and it was dead simple to use (low learning curve) and presented nice, detailed data in a way that was easy to understand. The price tag is worth it, but it isn't free ...

Solution 11 - C#

> Patrick Smacchia's awesome NDepend is > excellent for providing static > analysis.

I would thoroughly recommend NDepend for static analysis, but just be warned that you'll probably need to put aside a day or two to actually analyse the truckload of information that it provides as well as work out what all the stats actually mean in terms of your code.

Solution 12 - C#

I have had good luck with the .NET memory profiler

Solution 13 - C#

EQATEC profiler did the job here.

Solution 14 - C#

The current release of SharpDevelop (3.1.1) has a nice integrated profiler. It's quite fast, and integrates very well into the SharpDevelop IDE and its NUnit runner. Results are displayed in a flexible Tree/List style (use LINQ to create your own selection). Doublecliking the displayed method jumps directly into the source code.

Solution 15 - C#

Currently don't use them, a buddy of mine raves about Ants profiler. I know its a for-pay product not sure how expensive. If you happen to staff an MVP you might be able to leverage that to get a license for free.

Solution 16 - C#

AQTime (both perf and memory) or ANTS (v4 performance profiler or v5 beta memory profiler) here.

Solution 17 - C#

I found the .NET Memory Profiler yesterday, and I must say that I'm very impressed by it.
I'm going to order my license today.

Solution 18 - C#

Although not very good to profile memory usage, the profiler included in some versions of Visual Studio does a very good job of profiling execution speed.

Solution 19 - C#

What's your objective?

Is it your objective to locate specific statements and get a rough idea of what they are contributing to your total execution time, so you can find ways to do them differently?

For that, I swear by this method.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGareth SimpsonView Question on Stackoverflow
Solution 1 - C#AdamSaneView Answer on Stackoverflow
Solution 2 - C#jfsView Answer on Stackoverflow
Solution 3 - C#HullCitySteveView Answer on Stackoverflow
Solution 4 - C#Leon BambrickView Answer on Stackoverflow
Solution 5 - C#FabriceView Answer on Stackoverflow
Solution 6 - C#mbillardView Answer on Stackoverflow
Solution 7 - C#Will DeanView Answer on Stackoverflow
Solution 8 - C#CraiggerView Answer on Stackoverflow
Solution 9 - C#MarkView Answer on Stackoverflow
Solution 10 - C#Jason SundramView Answer on Stackoverflow
Solution 11 - C#lomaxxView Answer on Stackoverflow
Solution 12 - C#MedicineManView Answer on Stackoverflow
Solution 13 - C#Caio Cesar MoreiraView Answer on Stackoverflow
Solution 14 - C#David SchmittView Answer on Stackoverflow
Solution 15 - C#DevelopingChrisView Answer on Stackoverflow
Solution 16 - C#Miha MarkicView Answer on Stackoverflow
Solution 17 - C#Patrik SvenssonView Answer on Stackoverflow
Solution 18 - C#Meta-KnightView Answer on Stackoverflow
Solution 19 - C#Mike DunlaveyView Answer on Stackoverflow