5

我有一个 Visual Studio 2005 解决方案工作区,其中又包含 8 个项目。我想分析完整的代码(所有项目)并获得一些关于每个函数执行的绝对周期,或者至少是周期消耗的百分比。

我查看了 VS 2005 的帮助以及项目设置选项,但在 hwo 上找不到任何指针来获取配置文件信息。对此的任何帮助都是有益的。

-广告。

4

8 回答 8

3

如果您的应用程序不是特别密集的处理器,redgate ANTS Profiler是一个不错的选择 - 逐行统计数据可以派上用场,并且整个产品干净且设计良好。

但是,如果您的应用程序需要大量 CPU 才能正常运行,那么市场上的大多数 .NET 分析器将无法处理它。我发现的唯一两个适用于真正重量级的应用程序的是JetBrains dotTraceYourKit。两者非常相似,这并不奇怪,因为 YourKit 似乎是由前 JetBrains 员工创建的。我个人更喜欢 dotTrace,但这可能只是因为这是我首先使用的,而且从来没有任何好的理由来切换。

我已经测试过 ANTS、AQTime、DevPartner、GlowCode、Borland OptimizeIt 和 Intel VTune,它们都具有太多的开销来处理要求苛刻的应用程序。(VTune 是一个可能的例外,但它的配置和使用非常复杂,以至于我无法确切地弄清楚它可以处理什么。它也非常昂贵。)

于 2008-09-05T16:18:29.607 回答
2

I've used both the profiler in Compuware’s DevPartner (I like to still call it “TrueTime”) and Rational's Quantify. I always liked Quantify better, but as I've moved between companies DevPartner is usually already the “standard”.

Both are expensive, but they (seem to) add so much value that any commercial shop should have no problem investing in some seats.

Quantify didn’t require special rebuilds of the project – which was GREAT. It also crashed less (that’s not saying much, it had its own issues). DevPartner also tends to break as each new version of Visual Stuido was release (maybe this is better now?). Buy the yearly maintenance agreement if you go this way.

That said, I’ve often just write a class remembers the time at construction and spits out (log file) the elapsed time in its destructor. I used QueryPerformanceCounter. I’d stick this class at the top of the function I’d want to time. You could get fancy with making it a macro, use the preprocessor to include this class only under a special build…</p>

于 2008-09-05T16:52:02.847 回答
2

我猜 Visual Studio 2005 的内置分析器仅与开发人员版和团队版一起提供。我有一个专业版,它似乎没有内置的分析器工具。

-广告

于 2008-09-05T13:23:36.640 回答
2

我向您推荐EQATEC分析器,它的站点中还包含一个跟踪器。

它也是免费且易于使用的。

替代文字 http://www.eqatec.com/tools/profiler/profiler-logo.gif

于 2008-11-13T21:29:53.653 回答
1

我们将DevPartner与 Visual Studio 2005 结合使用。它为您提供了您想要查看的解决方案中特定项目的性能分析。我们还将它用于内存管理分析和错误分析。是商业工具,所以它不是免费的。

于 2008-09-05T13:38:51.347 回答
0

Red-gate 的Profiler非常适合这一点。

于 2008-09-05T13:06:48.910 回答
0

我使用Jebrains 分析器非常易于使用并且性能也非常好。

于 2008-09-05T13:09:12.370 回答
0
但是,如果您的应用程序需要大量 CPU 才能正常运行,那么市场上的大多数 .NET 分析器将无法处理它。

我在优化算法上使用了 RedGate Ant 分析器的试用版,该算法通常在单核机器上使用高达 100% 的 CPU,虽然速度很慢,但它设法通过并报告了我需要知道的所有内容。非常有用的工具。我想知道你在 Ant 的分析器上运行了什么样的算法。

有人用过 VS profiler 吗?

于 2008-09-05T16:28:36.790 回答