tags:

views:

411

answers:

11

Does anyone have any good recommendations for code profiling? I would like to be able to view the system heap, memory usage, garbage collection statuses, etc...

+5  A: 

Red Gate Performance Profiler

If you buy the .NET Bundle, you also get Memory Profiler

Justin Niessner
Used this once and it is amazing. The interface is very well done as well.
Zoidberg
This is a great tool but the price used to be a lot better. Now they "nickle and dime" you to get all of the same features they used to offer at a single price point.
Greg
+5  A: 

dotTrace from JetBrains is very good.

Jonas Elfström
+4  A: 
  1. Ants Profiler by Red Gate
  2. DotTrace by JetBrains (the makers of ReSharper)

My preference is currently in that order as the new version of Ants has a lot of new features like line level profiling that DotTrace doesn't have yet.

Dan Rigby
+3  A: 

For memory profiling I couldn't beat .NET Memory Profiler. Had everything I needed.

Kieron
A: 

YourKit is another option.

jamesaharvey
I've used YourKit with mixed results. I like the feel of the tool, but the quality of the results just doesn't seem to be on the same level as Ants or DotTrace. Also it seems like their maintenance of the .Net version has dropped off a bit. Not sure if they're planning to release another version.
Dan Rigby
I agree with you Dan. I've been happier with Ants as well, but I at least wanted to get the option out there.
jamesaharvey
A: 

Just to add to all the relevant answers. If you want to inspect the runtime heaps, memory usage and so forth you can actually do all of this (and a lot more) using WinDbg and Sos.dll, which are free. It is not a profiler, but it is a very useful tool for examining the application at runtime.

Brian Rasmussen
A: 

CLR Profiler is very useful.

Brief Description
The CLR Profiler allows developers to see the allocation profile of their manage applications.

You can find more details about CLR Profiler in this MSDN article.

Alex
A: 

AQTime has done pretty much everything I've needed: time, memory, and resource profiling. It's easy to use, the results easy to act upon and it works on unmanaged code as well.

plinth
+1  A: 

There's also a profiler included in some versions of Visual Studio. The one included in Visual Studio 2010 seems nice. I don't know if it's good at profiling memory usage though.

Meta-Knight
A: 

Since everyone's listing the available tools, I thought I'd point you to the complete list of profilers for .NET: http://sharptoolbox.com/categories/profilers-debuggers

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

Fabrice
A: 

If you are looking for bottlenecks, I think this is best. It finds them in no time, and you don't have to buy or install anything.

Mike Dunlavey