views:

7472

answers:

20

I urgently 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?

+1  A: 

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.

DevelopingChris
can you provide a bit more detail on the whole MVP thing? thanks,
Keivan
MVP's get the license to redgate products for free, its a loop hole that gets you in, if you have people on your team who are MVP's making the cost a non-issue.
DevelopingChris
Do you have a link describing this loophole and how to capitalize on it?
Keith Sirmons
+1  A: 

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

Mark
+25  A: 

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.

AdamSane
I like ANTS too. It is from Redgate.
Marcel
+22  A: 

dotTrace from JetBrains is widely used.

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

Leon Bambrick
dotTrace is truly an excellent profiler, extremely easy to use.
Stefan Monov
dotTrace 3.1 does not work with .NET 4. We have to wait for dotTrace 4.0.
Bobby Cannon
+17  A: 

You can try the following:

John
I've played around with ProfileSharp. It's absolutely awful.
Matthew Ruston
nprof is .Net 1.1 only I think. If you can compile to .Net 1.1 then it may still be useful to profile it and then recompile to .Net 2 for release. However this isn't possible if you start using .Net2 features such as generics and nullable types.
locster
Agree with Matthew, ProfileSharp is terrible, couldn't get it to profile even the simplest command line exe. Don't waste your time
Michael Dausmann
Development on nprof seems to have picked up recently.
Brian Ortiz
I've used .Net Memory Profiler to find a memory leak; it's pretty good. It's got my seal of approval!
Cylon Cat
That website for ProfileSharp seems like spam. ???
Rosarch
+3  A: 

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

GoodEnough
+2  A: 

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.

lomaxx
A: 

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.

Patrik
+5  A: 

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?

Will Dean
+1  A: 

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 ...

Jason Sundram
+4  A: 

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.

Craigger
Have you tried v4 of both? It's much better all-round now :)
thecoop
+1  A: 

I have had good luck with the .NET memory profiler

MedicineMan
A: 

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.

Meta-Knight
+1  A: 

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

Miha Markic
+16  A: 

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.

HullCitySteve
Not free for a commercial license (but still cheap, $200).
mhenry1384
Yes it looks like they have changed the licencing for the latest version, and started charging for commercial use. I'd still highly recommend it though.
HullCitySteve
Update - it looks like they have changed the licence terms again to make it free for commercial use for standard .NET applications (but not CF or Silverlight)
HullCitySteve
A: 

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.

Mike Dunlavey
+2  A: 

EQATEC profiler did the job here.

Caio Cesar Moreira
+6  A: 

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.

Fabrice
A: 

I'm using YourKit .NET profiler http://www.yourkit.com/.net/profiler/ It's very good.

Serge
A: 

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.

David Schmitt