分析跨程序集的代码流

发布于 2024-12-22 13:06:24 字数 321 浏览 1 评论 0原文

我必须调查某个涉及几个(目前未知)步骤的过程。 我需要一些有效的方法来分析考虑时间跨度(可能是内存使用情况)涉及哪些常规子进程(驻留在各个程序集中)。

仅使用智能设置的断点运行代码意味着要花费太多时间来寻找“智能”放置断点的位置。稍后,我还必须从数百个方法调用和辅助类中重新创建一般逻辑步骤的一般序列。

生成序列图可能会有所帮助,但它可能会跨越从地球到火星)。

因此,您可能知道一些工具可以帮助您以某种合理的抽象级别理解该过程的逻辑。

(我尝试了 VS 的内置分析器 - 它很好,但需要花费很多时间来分析结果,并且实际上显示热点,并且再次不会“恢复”实际逻辑。)

I have to investigate a certain process which involves several (unknown at this point) steps.
I need some efficient approach to analyze what general subproccess (residing in various assemblies) are involved considering time spans (possibly memory usage).

Just running the code with intelligently set breakpoints means spending too much time finding where it would be "intelligent" to place them. Later I will also have to recreate general sequence of the general logical steps out of hundreds of method calls and helper classes.

Generating seqence diagram will probably help, but again it may span from Earth to Mars).

So, may be you are aware of some tools that could help understand the logic of that process with some reasonable level of abstraction.

(I tried built-in profiler for VS - it's good but takes many hours to analyze the results, and actually shows hotpoints and again doesn't "restore" the actual logic.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

-黛色若梦 2024-12-29 13:06:24

NDepend 可能会对您有所帮助,因为您正在执行代码分析。

既然您提到您想从正在运行的代码生成序列图...来自 Sparx 的 企业架构师系统可以做到这一点。请查看手册

链接可能对您也有用。

如果您有钱可以花,您可以使用 RedGate Develper Bundle对于.NET它有性能分析器、内存分析器等。它还有一个评估版本。

对于分析器来说,还有其他更便宜的替代品

NDepend might be of help to you since you are performing code analysis.

Since you mentioned that you would like to generate a sequence diagram from the running code... Enterprise architect from Sparx systems can do that. Check out the manual.

This link might be useful to you also.

If you have some money to spend you could use RedGate Develper Bundle for .NET It has Performance profiler, Memory profiler etc. It has an evaluation version also.

There are also other cheaper alternatives for profilers.

旧时浪漫 2024-12-29 13:06:24

有比 Visual Studio Profiler 更高级的探查器应用程序,但除非您的逻辑使用单独的 AppDomains 或者易于分组,否则总是需要花费大量时间来调查此类问题。

Visual Studio Ultimate 能够从代码生成依赖关系矩阵和序列图。 VisualNDepend 也可以做到这一点。但是,虽然这些可以让您深入了解代码的静态行为,但它不会帮助您弄清楚它的运行时行为。

代码分析(在 Visual Studio Premium 和 Ultimate 中)具有一组基于新数据流分析引擎的规则。可以为这些编写自定义规则,但至少可以说这并不是最简单的事情。

您也许可以将 IntelliTrace 与 Profiler 数据的结果结合起来以精确定位

There are more advanced profiler applications than the Visual Studio Profiler, but unless you're logic uses separate AppDomains or is otherwise easy to group, it will always take a considerable amount of time to investigate these kinds of issues.

Visual Studio Ultimate has the ability to generate dependency matrices and sequence diagrams from your code. VisualNDepend can do that as well. But while these will give you insights in the static behavior of the code, it won't help you to figure out the runtime behavior of it.

Code Analysis (in Visual Studio Premium and Ultimate) has a set of rules based on the new DataFlow Analysis Engine. It is possible to write custom rules for these, but it's not the simplest thing to do to say the least.

You might be able to combine IntelliTrace with the outcome of the Profiler data to pinpoint

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文