C# 什么是好的 .NET Profiler?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3927/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What Are Some Good .NET Profilers?
提问by ricree
What profilers have you used when working with .net programs, and which would you particularly recommend?
您在处理 .net 程序时使用了哪些分析器,您特别推荐哪些分析器?
采纳答案by Matt Howells
I have used JetBrains dotTraceand Redgate ANTSextensively. They are fairly similar in features and price. They both offer useful performance profiling and quite basic memory profiling.
我广泛使用了JetBrains dotTrace和Redgate ANTS。它们在功能和价格上非常相似。它们都提供有用的性能分析和非常基本的内存分析。
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)
dotTrace 与 Resharper 集成,这真的很方便,因为您可以从 IDE 中单击一下来分析单元测试的性能。然而,dotTrace 似乎经常给出虚假的结果(例如说一个方法需要几年才能运行)
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.
我更喜欢 ANTS 呈现分析结果的方式。它向您显示源代码,每行的左侧告诉您运行所需的时间。dotTrace 只有一个树视图。
EQATEC profileris 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.
EQATEC 探查器非常基础,需要您编译程序集的特殊检测版本,然后可以在 EQATEC 探查器中运行。然而,它是免费的。
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.
总的来说,我更喜欢 ANTS 进行性能分析,尽管如果您使用 Resharper,那么 dotTrace 的集成是一个杀手级功能,这意味着它在可用性方面胜过 ANTS。
The free Microsoft CLR Profiler (.Net framework 2.0/ .Net Framework 4.0) is all you need for .NET memory profiling.
免费的 Microsoft CLR Profiler(.Net framework 2.0/ .Net Framework 4.0)是 .NET 内存分析所需的全部。
2011 Update:
2011年更新:
The Scitech memory profilerhas 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 windbg.exe
.
在赛特内存分析器具有相当基本的UI,但很多有用的信息,包括对非托管内存一些资料,dotTrace和蚂蚁缺乏-你可能会发现它有用,如果你正在做的COM互操作,但我还没有找到,使得COM的任何事件探查记忆问题很容易诊断——你通常不得不爆发windbg.exe
。
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.
ANTS 分析器在过去几年中突飞猛进,它的内存分析器具有一些真正有用的功能,据我估计,这些功能现在将其作为一个包推到了 dotTrace 之前。我很幸运拥有两者的许可证,但是如果您打算购买一个同时兼顾性能和内存的 .Net 分析器,请选择 ANTS。
回答by Kev
I've worked with RedGate's profiler in the past. Did the job for me.
我过去曾使用过 RedGate 的分析器。为我做了这项工作。
回答by Michael Stum
I've been working with JetBrains dotTracefor WinForms and Console Apps (not tested on ASP.net yet), and it works quite well:
我一直在为 WinForms 和控制台应用程序使用JetBrains dotTrace(尚未在 ASP.net 上进行测试),它运行良好:
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 :-)
他们最近还增加了一个比公司许可证便宜得多的“个人许可证”。不过,如果其他人知道一些更便宜甚至免费的,我也想听听:-)
回答by palmsey
ANTS Profiler. I haven't used many, but I don't really have any complaints about ANTS. The visualization is really helpful.
蚂蚁分析器。我没有用过很多,但我对 ANTS 没有任何抱怨。可视化真的很有帮助。
回答by TrolleFar
I recently discovered EQATEC Profiler http://www.eqatec.com/tools/profiler. 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.
我最近发现了 EQATEC Profiler http://www.eqatec.com/tools/profiler。它适用于大多数 .NET 版本和许多平台。它易于使用且部分内容是免费的,即使用于商业用途也是如此。
回答by Lars Truijens
AutomatedQA AQTimefor timing and SciTech MemProfilerfor memory.
用于计时的AutomaticQA AQTime和用于内存的SciTech MemProfiler。
回答by Ant
In the past, I've used the profiler that ships with Visual Studio Team System.
过去,我使用了Visual Studio Team System附带的分析器。
回答by leppie
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.
不幸的是,我尝试过的大多数分析器在与尾调用一起使用时都失败了,尤其是 ANTS。我只是最终写了我自己的。CodeProject 上有一个简单的实现,您可以将其用作基础。
回答by leppie
Intel? VTune? Performance Analyzerfor quick sampling