ASP.NET MVC2 应用程序代码分析
这里的线程似乎很接近: 使用 EQATEC Profiler 分析 ASP.NET 网站
但是,在免费版本中我今天下载的 Equatec 没有 ASP.NET 和普通 Web 的复选框。我已将应用程序路径指向项目文件夹中的 bin 目录,并通过 Visual Studio 启动了应用程序的本地主机托管。
我也对其他免费工具持开放态度。我只是在寻找某种方法来分析代码以优化我们正在使用的一些反射。
我使用的是专业版,因此不幸的是无法访问 MS Code Profiling。
我现在希望进行性能分析。
Equatec 的免费版本能够执行 ASP.NET 应用程序吗?
是否有免费的分析器(我意识到以前已经有人问过这个问题,除了付费应用程序之外似乎很少出现,但不妨问一下)?
MVC 是在分析器中需要特别寻找的东西吗?
The thread here seems close:
Profiling ASP.NET websites with EQATEC Profiler
However, in the free version of Equatec I downloaded today there is no checkboxes for ASP.NET, and ordinary web. I have pointed the App path to my bin directory in my project folder as well as started up the localhost hosting for my application via Visual Studio.
I am open to other free tools as well. I am just looking for someway to profile the code as to optimize some reflection we are using.
I am using the professional edition so unfortunantly do not have access to MS Code Profiling.
I am looking to do performance profiling at this point.
Is the free version of Equatec capable of doing ASP.NET applications?
Is there a free profiler (I realize this has been asked before, and little seems to have surfaced but paid apps, but might as well ask)?
Is MVC a special thing to look for in a profiler?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
综合分析工具似乎仍然相当昂贵。我喜欢 dotTrace 系列,但它们不是免费的。
您尚未指定要执行哪种分析。您是否想更多地了解应用程序的内存使用情况或 CPU 使用情况?
在分析方面,MVC 应用程序没有什么特别之处。您将需要一个能够启动 ASP.NET 的探查器。除此之外,MVC 只是一组常规的类库。
您是否尝试过免费的CLR Profiler?它处理 ASP.NET 并将显示内存和一些方法调用活动。它不像 dotTrace 那样全面,但如果您刚开始使用,它是一个很好的免费替代方案。
Comprehensive profiling tools still seem to be quite expensive. I like the dotTrace family, but they're not free.
You haven't specified what kind of profiling you want to do. Are you trying to understand more about the memory usage of your application, or CPU usage?
There is nothing special about MVC applications when it comes to profiling. You will need a profiler that's capable of launching ASP.NET. Beyond that, MVC is just a regular bunch of class libraries.
Have you tried the free CLR Profiler? It handles ASP.NET and will show both memory and some method call activity. It's not as comprehensive as say dotTrace, but it is a great free alternative if you're starting out.
该指南实际上并没有过时:stackoverflow重复问题中描述的几个步骤(最后编辑于 4 月 8 日)仍然最好地描述了如何分析 ASP.NET 应用程序。请注意,您应该查看已接受的答案,即当前有 16 票赞成的答案。
构建仪表化应用程序后,上面的 stackoverflow-answer 中需要注意的重要事项是第 3 步:“加载您的应用程序”。这意味着您应该加载您的应用程序,并且这是探查器无法为 ASP.NET 应用程序自动执行的唯一步骤。
您通常只需在浏览器中导航到应用程序即可加载该应用程序,因此您只需在构建步骤之后执行此操作即可。当您的(已检测的)代码被激活时,它的分析部分将立即生效并连接到分析器,然后您可以拍摄快照。
请注意,ASP.NET 不需要主入口点。这只是为具有 Main 方法的实际可执行文件自动拍摄快照的额外便利。
The guide is actually not out of date: the few steps described in the stackoverflow duplicate question (last edited April 8th) still describes best how you should profile ASP.NET apps. Note that you should look at the accepted answer, the one with currently 16 upvotes.
After you've build the instrumented app the important thing to note in the stackoverflow-answer above is step 3: "load your app". It means that you should cause your app to be loaded and is the only step the profiler can't do automatically for ASP.NET apps.
You typically load the app simply by navigating to it in a browser so you simply need to do that after the build-step. When your (instrumented) code is activated the profiling part of it will spring into life and connect to the profiler and then you can take snapshots.
Note that ASP.NET doesn't need a main entry point. That's just an added convenience for automatically taking snapshots for real executables that has a Main method.
您只需要一个 .NET 分析器。
分析 WebForms、MVC、SharePoint、Sitecore、Ektron、Sitefinity 或在 .NET 上运行的任何其他产品不会改变这一点。
You just need a .NET profiler.
Profiling WebForms, MVC, SharePoint, Sitecore, Ektron, Sitefinity, or any other product that runs on .NET doesn't change that.