使用 Visual Studio 2010 Profiler 分析 ASP.NET 网页。除了“层级交互”之外还有什么帮助吗?代码覆盖率?
是否有人在本地运行时在 ASP.NET 网页上运行探查器。我猜它就像一个穷人的负载测试仪。
层交互似乎是唯一真正有用的部分,因为它显示了所做的所有查询,这通常是 ASP.NET 应用程序中的瓶颈...不过还有很多其他选项...任何使用此功能的人都可以告诉我知道他们正在使用什么以及他们认为分析有多大用处?
另外,您可以在分析会话中进行代码覆盖吗?代码覆盖率似乎仅用于“测试”?
Does anyone out there run the profiler on thier ASP.NET web page when running locally. I guess it is like a poor mans load tester.
The tier interactions seems to be the only real usesful part since that show all the queries made and that is normally the bottleneck in a ASP.NET app... There are alot of other options though... Anyone out there using this can tell me what they are using and how useful they find profiling?
Also, can you do CODE COVERAGE on a profiling session ? It seems CODE COVERAGE is only for 'tests' ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您所指出的,层交互分析 (TIP) 为您提供有关数据库调用的更详细信息,一直到 SQL 语句。有关详细信息,请参阅 分析器博客。
分析 ASP.NET 时推荐的另一个选项是使用检测模式进行分析。此分析方法显示诸如函数调用计数和执行每个函数的时间(包括阻塞等待 I/O 等所花费的时间)等统计信息。
如果您要同步调用数据库或执行大量文件或网络 I/O,这尤其有用,因为您可以检测调用方法并考虑优化它们。
如果您碰巧有一些 CPU 密集型 ASP.NET 代码,您还可以考虑使用采样分析模式。这允许您检测使用大量 CPU 的函数,尽管这在 ASP.NET 应用程序中不太常见。
由于您使用的是 Visual Studio 2010,因此您还可以考虑在启用了分析功能的远程服务器上进行负载测试。有关详细信息,请参阅 MSDN。
As you noted, Tier Interaction Profiling (TIP) gives you more detailed information about calls to databases, right down to the SQL statements For more information refer to the Profiler Blog.
Another recommended option when profiling ASP.NET is to profile using Instrumentation Mode. This profiling method shows statistics like function call counts and the time to execute each function (including time spent blocked waiting for I/O etc.).
This is particularly useful if you are making synchronous calls to a database or doing a lot of file or network I/O, since you can detect the calling methods and consider optimizing them.
If you happen to have some ASP.NET code that is CPU intensive, you can also consider using the Sampling profiling mode. This allows you to detect functions that use significant amounts of CPU, although this is less typical in ASP.NET applications.
Since you're using Visual Studio 2010, you might also consider doing load tests on a remote server with profiling enabled. For more information refer to MSDN.