4

What is a good profiler for .NET 4.0? I'm willing to spend some money, but not too much (say up to £50)

I'm developing games for windows phone and xbox using XNA, which means that the projects are commercial. I mention it because I've seen several which are free for non commercial use.

Extra points for Visual studio integration.

Nb. I'm using Visual Studio Professional 2010

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Martin
  • 12,469
  • 13
  • 64
  • 128
  • possible duplicate: http://stackoverflow.com/questions/3927/what-are-some-good-net-profilers – ckittel Aug 20 '11 at 21:56
  • This question was (and still is) specific to .net4, which at the time had very few free/affordable profilers – Martin Aug 21 '11 at 03:03
  • Understood, just linking for cross-reference reasons (ppl searching and for your benefit too in case you didn't see it). – ckittel Aug 21 '11 at 04:03
  • Ah fair enough, I thought it was an effort to close the question. Thanks for the link :) – Martin Aug 23 '11 at 03:42

5 Answers5

5

A tremendously under-advertised free profiler is the SharpDevelop Profiler.

Screenshot:

SharpDevelop
(source: sharpdevelop.net)

It is really powerful, and supports the tremendously undocumented PSQL (Profiler SQL as they call it). For example, I can filter all the functions I am interested in by entering this in to the query bar:

for f in Functions where f.Name.Contains("Foo") select f
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
kizzx2
  • 18,775
  • 14
  • 76
  • 83
3

The EQATEC Profiler profiles just about everything .NET, including what you need:

  • Full .NET 2.0 and above
  • Windows Phone 7, both Silverlight and XNA apps
  • Silverlight 2.0 and above
  • NET CF 2.0 and above (WinCE, Windows Mobile)
  • Xbox XNA (lacking integrated deployment to Xbox-device, though)

Long story short: the only thing it doesn't profile is .NET 1.x (full/netcf). No other profilers in the World works on this many .NET platforms. It's also known for being quite easy to use.

2

Visual Studio 2010 has a pretty good builtin profiler (only available in the Premium and Ultimate editions though)

Another great profiler is dotTrace.

I only listed the profilers I know support .Net 4.0 right now, but do take a look at this older question about .Net profilers. Maybe some of them have recently added support for .Net 4.0 too. In any case, I don't think there are any new profilers out there, since it's a pretty complex topic.

Community
  • 1
  • 1
Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275
2

Slim Tune is a great profiler

Daniel Little
  • 16,975
  • 12
  • 69
  • 93
0

Everybody wants a profiler, but this low-tech method works just fine.

Mike Dunlavey
  • 40,059
  • 14
  • 91
  • 135
  • While it *is possible* to do this, it's not really viable, you waste too much time. – Mauricio Scheffer Apr 06 '10 at 12:18
  • @Mauricio Scheffer: It is understandable to have such opinions if it has not been tried. In my experience (and others on SO) it finds problems very quickly, while people are still trying to get their profilers installed, get them running, figure out what the output means, and realize they don't always tell what they need to know. – Mike Dunlavey Apr 06 '10 at 16:16
  • ... Here's a list of myths that many profilers are prone to, including the one in VS, if I'm not mistaken: http://stackoverflow.com/questions/1777556/alternatives-to-gprof/1779343#1779343 – Mike Dunlavey Apr 06 '10 at 16:34
  • I don't know why you would assume that kind of things about me. I do use low-tech/poor-man profiling methods (in fact I have blogged about one: http://bugsquash.blogspot.com/2009/08/poor-man-profiler-with-windsor.html) but I still think a good profiler is better and faster in 99% of the cases, at least for the kind of code *I've* been handling so far in my short career. – Mauricio Scheffer Apr 06 '10 at 17:20
  • @Mauricio Scheffer: Sorry - I know people on SO are just trying to help each other. In my long career I see people trying out motorcycles, Volkswagens, Maseratis, when a rowboat does the job (though it's OK to put a motor on it). It's a different perspective - not a top-down approach of measuring time, and being concerned about accuracy, but rather a bottom-up approach of asking what it is doing and *why*, on only a rough percentage basis, looking at lines, not functions, and looking at wall-clock time, not CPU time, ignoring irrelevant stuff like recursion. – Mike Dunlavey Apr 06 '10 at 18:19