<p>What profilers have you used when working with .net programs, and which would you particularly recommend?</p>

[{'answer_id': 3931, 'author': 'Kev', 'author_id': 419, 'author_profile': 'https://Stackoverflow.com/users/419', 'pm_score': 2, 'selected': False, 'text': "<p>I've worked with RedGate's profiler in the past. Did the job for me.</p>\n"}, {'answer_id': 3932, 'author': 'Michael Stum', 'author_id': 91, 'author_profile': 'https://Stackoverflow.com/users/91', 'pm_score': 3, 'selected': False, 'text': '<p>I\'ve been working with <a href="http://www.jetbrains.com/profiler/" rel="nofollow noreferrer">JetBrains dotTrace</a> for WinForms and Console Apps (not tested on ASP.net yet), and it works quite well:</p>\n\n<p>They recently also added a "Personal License" that is significantly cheaper than the corporate one. Still, if anyone else knows some cheaper or even free ones, I\'d like to hear as well :-)</p>\n'}, {'answer_id': 3934, 'author': 'palmsey', 'author_id': 521, 'author_profile': 'https://Stackoverflow.com/users/521', 'pm_score': 4, 'selected': False, 'text': '<p><a href="http://www.red-gate.com/products/ants_profiler/index.htm" rel="noreferrer">ANTS Profiler</a>. I haven\'t used many, but I don\'t really have any complaints about ANTS. The visualization is really helpful.</p>\n'}, {'answer_id': 3935, 'author': 'Greg Hurlman', 'author_id': 35, 'author_profile': 'https://Stackoverflow.com/users/35', 'pm_score': 5, 'selected': False, 'text': '<p>Don\'t forget <a href="http://code.google.com/p/nprof/" rel="nofollow noreferrer" title="nprof on Google Project Hosting">nProf</a> - a prefectly good, freeware profiler.</p>\n'}, {'answer_id': 34278, 'author': 'TrolleFar', 'author_id': 3602, 'author_profile': 'https://Stackoverflow.com/users/3602', 'pm_score': 6, 'selected': False, 'text': '<p>I recently discovered EQATEC Profiler <a href="http://www.eqatec.com/tools/profiler" rel="nofollow noreferrer">http://www.eqatec.com/tools/profiler</a>. It works with most .NET versions and on a bunch of platforms. It is easy to use and parts of it is free, even for commercial use.</p>\n'}, {'answer_id': 34281, 'author': 'Lars Truijens', 'author_id': 1242, 'author_profile': 'https://Stackoverflow.com/users/1242', 'pm_score': 4, 'selected': False, 'text': '<p><a href="http://www.automatedqa.com/products/aqtime/index.asp" rel="nofollow noreferrer">AutomatedQA AQTime</a> for timing and <a href="http://memprofiler.com/" rel="nofollow noreferrer">SciTech MemProfiler</a> for memory.</p>\n'}, {'answer_id': 36650, 'author': 'Ant', 'author_id': 3709, 'author_profile': 'https://Stackoverflow.com/users/3709', 'pm_score': 2, 'selected': False, 'text': '<p>In the past, I’ve used the profiler that ships with <a href="http://en.wikipedia.org/wiki/VSTS_Profiler" rel="nofollow noreferrer">Visual Studio Team System</a>.</p>\n'}, {'answer_id': 100490, 'author': 'Matt Howells', 'author_id': 16881, 'author_profile': 'https://Stackoverflow.com/users/16881', 'pm_score': 9, 'selected': True, 'text': '<p>I have used <a href="http://www.jetbrains.com/profiler/" rel="noreferrer">JetBrains dotTrace</a> and <a href="http://www.red-gate.com/products/ants_performance_profiler/" rel="noreferrer">Redgate ANTS</a> extensively. They are fairly similar in features and price. They both offer useful performance profiling and quite basic memory profiling.</p>\n\n<p>dotTrace integrates with Resharper, which is really convenient, as you can profile the performance of a unit test with one click from the IDE. However, dotTrace often seems to give spurious results (e.g. saying that a method took several years to run)</p>\n\n<p>I prefer the way that ANTS presents the profiling results. It shows you the source code and to the left of each line tells you how long it took to run. dotTrace just has a tree view.</p>\n\n<p><a href="http://www.eqatec.com/Profiler/" rel="noreferrer">EQATEC profiler</a> is quite basic and requires you to compile special instrumented versions of your assemblies which can then be run in the EQATEC profiler. It is, however, free.</p>\n\n<p>Overall I prefer ANTS for performance profiling, although if you use Resharper then the integration of dotTrace is a killer feature and means it beats ANTS in usability.</p>\n\n<p>The free Microsoft CLR Profiler (<a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=13382" rel="noreferrer">.Net framework 2.0</a> / <a href="http://www.microsoft.com/download/en/details.aspx?id=16273" rel="noreferrer">.Net Framework 4.0</a>) is all you need for .NET memory profiling.</p>\n\n<p><strong>2011 Update:</strong></p>\n\n<p>The <a href="http://memprofiler.com/" rel="noreferrer">Scitech memory profiler</a> has quite a basic UI but lots of useful information, including some information on unmanaged memory which dotTrace and ANTS lack - you might find it useful if you are doing COM interop, but I have yet to find any profiler that makes COM memory issues easy to diagnose - you usually have to break out <code>windbg.exe</code>.</p>\n\n<p>The ANTS profiler has come on in leaps and bounds in the last few years, and its memory profiler has some truly useful features which now pushed it ahead of dotTrace as a package in my estimation. I\'m lucky enough to have licenses for both, but if you are going to buy one .Net profiler for both performance and memory, make it ANTS.</p>\n'}, {'answer_id': 100525, 'author': 'leppie', 'author_id': 15541, 'author_profile': 'https://Stackoverflow.com/users/15541', 'pm_score': 1, 'selected': False, 'text': '<p>Unfortunate most of the profilers I tried failed when used with tail calls, most notably ANTS. I just end up writing my own.  There is a simple implementation on CodeProject that you can use as a base.</p>\n'}, {'answer_id': 100556, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://www.intel.com/cd/software/products/asmo-na/eng/219898.htm" rel="nofollow noreferrer">Intel®  VTune™ Performance Analyzer</a>  for quick sampling</p>\n'}, {'answer_id': 206760, 'author': 'Sam Saffron', 'author_id': 17174, 'author_profile': 'https://Stackoverflow.com/users/17174', 'pm_score': 3, 'selected': False, 'text': '<p>Don\'t forget the awesome scitech <a href="http://memprofiler.com/" rel="nofollow noreferrer">.net memory profiler</a></p>\n\n<p>It\'s great for tracking down why your .net app is running out of memory. </p>\n'}, {'answer_id': 612724, 'author': 'Jeff Moser', 'author_id': 1869, 'author_profile': 'https://Stackoverflow.com/users/1869', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://www.automatedqa.com/products/aqtime/" rel="nofollow noreferrer">AQTime</a> is reasonable, but has a bit of a learning curve and isn\'t as easy to use as the built in one in Team Suite</p>\n'}, {'answer_id': 612726, 'author': 'Svish', 'author_id': 39321, 'author_profile': 'https://Stackoverflow.com/users/39321', 'pm_score': 2, 'selected': False, 'text': '<p>Haven\'t tried it myself, but maybe <a href="http://www.jetbrains.com/profiler/" rel="nofollow noreferrer">dotTrace</a>? Their ReSharper application is certainly a good one. Maybe dotTrace is too :)</p>\n'}, {'answer_id': 612729, 'author': 'Brian Rasmussen', 'author_id': 38206, 'author_profile': 'https://Stackoverflow.com/users/38206', 'pm_score': 2, 'selected': False, 'text': '<p>I doubt that the profiler which comes with Visual Studio Team System is the best profiler, but I have found it to be good enough on many occasions. What specifically do you need beyond what VS offers?</p>\n\n<p>EDIT: Unfortunately it is only available in VS Team System, but if you have access to that it is worth checking out. </p>\n'}, {'answer_id': 612743, 'author': 'Chris Ballance', 'author_id': 1551, 'author_profile': 'https://Stackoverflow.com/users/1551', 'pm_score': 4, 'selected': False, 'text': '<p>I have found <a href="http://www.jetbrains.com/profiler/" rel="nofollow noreferrer">dotTrace Profiler</a> by <a href="http://www.jetbrains.com/" rel="nofollow noreferrer">JetBrains</a> to be an excellent profiling tool for .NET and their ASP.NET mode is quality.</p>\n'}, {'answer_id': 727989, 'author': 'shaunmartin', 'author_id': 24245, 'author_profile': 'https://Stackoverflow.com/users/24245', 'pm_score': 3, 'selected': False, 'text': '<p>I would add that dotTrace\'s ability to <strong>diff memory and performance trace sessions</strong> is absolutely invaluable (ANTS may also have a memory diff feature, but I didn\'t see a performance diff).</p>\n\n<p>Being able to run a profiling session before and after a bug fix or enhancement, then compare the results is incredibly valuable, especially with a mammoth legacy .NET application (as in my case) where performance was never a priority and where finding bottlenecks could be VERY tedious.  Doing a before-and-after diff allows you to see the <strong>change in call count for each method</strong> and the <strong>change in duration for each method</strong>.</p>\n\n<p>This is helpful not only during code changes, but also if you have an application that uses a different database, say, for each client/customer.  If one customer complains of slowness, you can run a profiling session using their database and compare the results with a "fast" database to determine which operations are contributing to the slowness.  Of course there are many database-side performance tools, but sometimes I really helps to see the performance metrics from the application side (since that\'s closer to what the user\'s actually seeing).</p>\n\n<p><strong>Bottom line: dotTrace works great, and the diff is invaluable.</strong></p>\n'}, {'answer_id': 956437, 'author': 'Mike Dunlavey', 'author_id': 23771, 'author_profile': 'https://Stackoverflow.com/users/23771', 'pm_score': 0, 'selected': False, 'text': '<p>I\'ve found plenty of problems in a big C# app using <a href="https://stackoverflow.com/questions/375913/what-can-i-use-to-profile-c-code-in-linux/378024#378024">this</a>.</p>\n\n<p>Usually the problem occurs during startup or shutdown as plugins are being loaded, and big data structures are being created, destroyed, serialized, or deserialized. Often they are created and initialized more than once, and change handlers get added multiple times, further compounding the problem.</p>\n\n<p>In cases like this, the program can be so sluggish that only 2 samples are sufficient to pinpoint the guilty method / function / property call sites.</p>\n'}, {'answer_id': 1095127, 'author': 'pablo', 'author_id': 72456, 'author_profile': 'https://Stackoverflow.com/users/72456', 'pm_score': 2, 'selected': False, 'text': "<p>The latest version of ANTS memory profiler (I think it's 5) simply rocks!!! I was haunting a leak using WinDbg and SOS since it proved to be the best way before, then I tried ANTS and I got it in minutes. Really a wonderful piece of software.</p>\n"}, {'answer_id': 1475257, 'author': 'Ben Robbins', 'author_id': 11163, 'author_profile': 'https://Stackoverflow.com/users/11163', 'pm_score': 6, 'selected': False, 'text': "<p>Others have covered performance profiling, but <strong>with regards to memory profiling</strong> \nI'm currently evaluating both the Scitech .NET Memory Profiler 3.1 and ANTS Memory Profiler 5.1 (current versions as of September 2009). I tried the JetBrains one a year or two ago and it wasn't as good as ANTS (for memory profiling) so I haven't bothered this time. From reading the web sites it looks like it doesn't have the same <em>memory profiling</em> features as the other two.</p>\n\n<p>Both ANTS and the Scitech memory profiler have features that the other doesn't, so which is best will depend upon your preferences. Generally speaking, the Scitech one provides more detailed information while the ANTS one is really incredible at identifying the leaking object. Overall, I prefer the ANTS one because it is so quick at identifying possible leaks.</p>\n\n<p>Here are the main the pros and cons of each from my experience:</p>\n\n<p><strong>Common Features of ANTS and Scitech .NET Memory Profiler</strong></p>\n\n<ul>\n<li>Real-time analysis feature</li>\n<li>Excellent how-to videos on their web sites</li>\n<li>Easy to use</li>\n<li>Reasonably performant (obviously slower than without the profiler attached, but not so much you become frustrated)</li>\n<li>Show instances of leaking objects</li>\n<li>Basically they both do the job pretty well</li>\n</ul>\n\n<p><strong>ANTS</strong></p>\n\n<ul>\n<li><strong>One-click filters to find common leaks</strong> including: objects kept alive only by event handlers, objects that are disposed but still live and objects that are only being kept alive by a reference from a disposed object. This is probably the killer feature of ANTS - finding leaks is incredibly fast because of this. In my experience, the majority of leaks are caused by event handlers not being unhooked and ANTS just takes you straight to these objects. Awesome.</li>\n<li>Object retention graph. While the same info is available in Scitech, it's much easier to interpret in ANTS.</li>\n<li>Shows size with children in addition to size of the object itself (but only when an instance is selected unfortunately, not in the overall class list).</li>\n<li>Better integration to Visual Studio (right-click on graph to jump to file)</li>\n</ul>\n\n<p><strong>Scitech .NET Memory Profiler</strong></p>\n\n<ul>\n<li>Shows stack trace when object was allocated. This is <strong>really</strong> useful for objects that are allocated in lots of different places. With ANTS it is difficult to determine exactly where the leaked object was created.</li>\n<li>Shows count of disposable objects that were not disposed. While not indicative of a leak, it does identify opportunities to fix this problem and improve your application performance as a result of faster garbage collection.</li>\n<li>More detailed filtering options (several columns can be filtered independently).</li>\n<li>Presents info on total objects created (including those garbage collected). ANTS only shows 'live' object stats. This makes it easier to analyze and tune overall application performance (eg. identify where lots of objects being created unnecessarily that aren't necessarily leaking).</li>\n</ul>\n\n<p>By way of summary, I think ANTS helps you find what's leaking faster while Scitech provides a bit more detail about your overall application memory performance and individual objects once you know what to look at (eg. stack trace on creation). If the stack trace and tracking of undisposed disposable objects was added to ANTS I wouldn't see the need to use anything else.</p>\n"}, {'answer_id': 2221780, 'author': 'David Schmitt', 'author_id': 4918, 'author_profile': 'https://Stackoverflow.com/users/4918', 'pm_score': 2, 'selected': False, 'text': '<p>The current release of <a href="http://www.icsharpcode.net/OpenSource/SD/" rel="nofollow noreferrer">SharpDevelop (3.1.1)</a> 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). Doubleclicking the displayed method jumps directly into the source code.</p>\n'}, {'answer_id': 2458143, 'author': 'James Poulose', 'author_id': 264747, 'author_profile': 'https://Stackoverflow.com/users/264747', 'pm_score': 1, 'selected': False, 'text': '<p>I must bring an amazing tool to your notice which i have used sometime back. <strong>AVICode Interceptor Studio</strong>. In my previous company we used this wonderful tool to profile the webapplication (<em>This is supposed to be the single largest web application in the world and the largest civilian IT project ever done</em>). The performance team did wonders with the help of this magnificent tool. It is a pain to configure it, but that is a one time activity and i would say it is worth the time. Checkout <a href="http://www.avicode.com/productsinterceptstudiooverview.htm" rel="nofollow noreferrer">this page</a> for details.</p>\n<p>Thanks,\nJames</p>\n'}, {'answer_id': 3044137, 'author': 'Redlab', 'author_id': 299787, 'author_profile': 'https://Stackoverflow.com/users/299787', 'pm_score': 2, 'selected': False, 'text': '<p>I would like to add <a href="http://www.yourkit.com/" rel="nofollow noreferrer">yourkit</a> java and .net profiler, I love it for Java, haven\'t tried .NET version though.</p>\n'}, {'answer_id': 3430253, 'author': 'Dirk', 'author_id': 413794, 'author_profile': 'https://Stackoverflow.com/users/413794', 'pm_score': 1, 'selected': False, 'text': '<p>For me SpeedTrace is the best tool on the market because it does not only help you to find bottlenecks inside your applications. It also helps you in troubleshooting scenarios to find out why your application was crashing, your setup did not install, your application hung up, your application performance is sometimes poor depending on the data input, e.g. to identify slow db transactions.</p>\n'}, {'answer_id': 4557410, 'author': 'Taudris', 'author_id': 108064, 'author_profile': 'https://Stackoverflow.com/users/108064', 'pm_score': 4, 'selected': False, 'text': '<p>If you\'re looking for something quick, easy, and free, <a href="http://code.google.com/p/slimtune/" rel="nofollow">http://code.google.com/p/slimtune/</a> seems to do the job fine.</p>\n'}, {'answer_id': 4847316, 'author': 'Matt Schuetze', 'author_id': 595005, 'author_profile': 'https://Stackoverflow.com/users/595005', 'pm_score': 1, 'selected': False, 'text': '<p>The NuMega True Time profiler lives on in DevPartner Studio by Micro Focus. It provides line and method level detail for .NET apps requiring only PDBs, no source needed (but it helps.) It can discriminate between algorithmically heavy routines versus those with long I/O waits using our proprietary per thread kernel mode timing driver. Version 10.5 ships with new 64-process support on February 4, 2011. Shameless plug: I work on the DevPartner product line. Follow up at <a href="http://www.DevPartner.com" rel="nofollow">http://www.DevPartner.com</a> for news of the 10.5 launch.</p>\n\n<p>Disclaimer: I am the Product Manager for DevPartner at Micro Focus.</p>\n'}, {'answer_id': 7149980, 'author': 'Todd', 'author_id': 54305, 'author_profile': 'https://Stackoverflow.com/users/54305', 'pm_score': 5, 'selected': False, 'text': '<p><em>[<a href="https://stackoverflow.com/users/54305/todd">Full Disclosure</a>]</em></p>\n\n<p>While not yet as full-featured as some of the other .NET memory profilers listed here, there is a new entry on the market called <a href="http://www.telerik.com/justtrace" rel="nofollow noreferrer">JustTrace</a>. It\'s made by Telerik and it\'s primary goal is to make tracing/profiling easier and faster to do for all types of apps (web/Silverlight/desktop).</p>\n\n<p>If you\'ve ever found profiling and optimization intimidating or slow with other tools, then <a href="http://www.telerik.com/justtrace" rel="nofollow noreferrer">JustTrace</a> might be worth a look.</p>\n'}, {'answer_id': 7283847, 'author': 'Ivan Petrov', 'author_id': 925308, 'author_profile': 'https://Stackoverflow.com/users/925308', 'pm_score': 1, 'selected': False, 'text': "<p>I've been testing Telerik's JustTrace recently and although it is well away from a finished product the guys are going in the right direction.</p>\n"}, {'answer_id': 8791473, 'author': 'Slobodan Savkovic', 'author_id': 538435, 'author_profile': 'https://Stackoverflow.com/users/538435', 'pm_score': 0, 'selected': False, 'text': '<p>We selected YourKit Profiler for .NET in my company as it was the best value (price vs. feature). For a small company that wants to have flexible licensing (floating licenses) it was a perfect choice - ANTS was developer seat locket at the time.</p>\n\n<p>Also, it provided us with the ability to attach to the running process which was not possible with dotTrace. Beware though that attaching is not the best option as everything .NET will slow down, but this was the only way to profile .NET applications started by other processes.\nFeature wise, ANTS and dotTrace were better - but in the end YourKit was good enough.</p>\n'}, {'answer_id': 9115097, 'author': 'Vibes', 'author_id': 1121091, 'author_profile': 'https://Stackoverflow.com/users/1121091', 'pm_score': 1, 'selected': False, 'text': '<p>If Licensing is an issue you could try WINDBG for memory profiling</p>\n'}, {'answer_id': 9686273, 'author': 'eka808', 'author_id': 287824, 'author_profile': 'https://Stackoverflow.com/users/287824', 'pm_score': 0, 'selected': False, 'text': "<p>If you're on ASP.NET MVC, you can try MVCMiniProfiler (http://benjii.me/2011/07/using-the-mvc-mini-profiler-with-entity-framework/)</p>\n"}]
['https://Stackoverflow.com/questions/3927', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/121/']