性能瓶颈 - 使用 Visual Studio

发布于 2024-11-24 13:24:23 字数 361 浏览 1 评论 0原文

我正在寻找一种方法来找到解决方案(很多项目)中的瓶颈方法。

假设我有一个巨大的程序(数千个方法),我想通过查找被多次调用的方法(实际上在运行时使用)并优化它们来提高性能。
我需要这个来解决用 C++、C#、CLI/C++ 编写的复杂问题。 (我可以在调试中编译所有内容并拥有 .pdb 文件)
因此,我正在寻找某种分析器,它可以告诉我每种方法使用了多少 cpu 时间。

我可以在 Visual Studio 中使用什么工具/插件/功能来获取该信息?
我希望能够运行该程序几分钟,然后分析该方法的 cpu 使用情况。或者甚至更好 - cpu 数量/调用次数。
如果我可以按命名空间或 dll/package/project 进行排序,那就更好了。

I'm looking for a way to find bottleneck methods in a solution (lots of projects).

Lets say i have a HUGE program (1000s of methods) and i want to improve performance by finding methods that are called a lot (actually used at runtime), and optimize them.
I need this for a complex problem that's written in C++, C#, CLI/C++. (I can compile it all in debug and have the .pdb files)
So, I'm looking for some kind of analyzer that will tell me how much cpu time each method is using.

What tool/addon/feature can I use in Visual Studio to get that information ?
I want to be able to run the program for a few minutes, and then analyze the method's cpu usage. Or even better - amount of cpu / number of calls.
Would be even better if I could sort by namespace or dll/package/project.

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

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

发布评论

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

评论(4

自此以后,行同陌路 2024-12-01 13:24:23

更昂贵的 Visual Studio 版本应该提供内置探查器:请参阅线。

然而,还有更多的分析方法,这个主题已经在 stackoverflow 上讨论过很多次了,例如这里

The more expensive Visual Studio versions should provide a Profiler builtin: see this thread.

However there are more methods to profile, this topic has been covered a lot of times on stackoverflow, here for example.

本宫微胖 2024-12-01 13:24:23

按照 Christian Goltz 的链接之一,我找到了一个可以执行我想要的操作的程序,它可以分析托管和非托管代码:

AQTime Pro

Following one of Christian Goltz links, I've found a program that might do what I want, it profiles both managed and unmanaged code:

AQTime Pro

离不开的别离 2024-12-01 13:24:23

我在 JetBrains 的 DotTrace 产品方面获得了一些良好的体验。不确定它是否具有 IDE 集成或您正在寻找的所有功能,但它绝对可以完成工作。

I'm had some good experiences with the DotTrace product by JetBrains. Not sure if it has the IDE integration or all the features that you're looking for, but it definitely gets the job done.

枉心 2024-12-01 13:24:23

这种方法技术含量较低,但效果很好。

我也在一个巨大的应用程序中工作,当我们遇到性能问题时,它会很快找到它们。

This method is low-tech, but works perfectly well.

I also work in a huge application, and when we have performance problems it finds them quickly.

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