您的位置:首页 > 编程语言 > ASP

web developer tips (60):如何对ASP.Net网站进行性能分析

2009-11-06 09:14 816 查看
原文地址:How to Profile an ASP.Net site?

1、使用Visual Studio Team Edition For Developers 创建一个Asp.netweb应用程序。

http://www.watch-life.net/visual-studio/profiling-an-asp-net-site.html

2、在Page_Load方法里写如下代码

protected void Page_Load(objectsender, EventArgs e)

{

int sum
= 0;

for(int i
= 0; i < 2000000; i++)

{

sum += i;

}

Response.Write(sum);

}

3、启动性能向导



4、选择当前应用,点击“下一步”



5、选择“采样”,点击“下一步”



6、单击“完成”.

7、在“性能资源管理器”中,选中“启动并启用分析功能”



8、将会启动IE,执行完后关闭IE。

9、vs将会性能分析报告摘要。



有关性能分析工具参见MSDN:
英文版:Getting Started with Profiling Tools
中文版:分析工具入门

更多文章见:守望轩[http://www.watch-life.net/]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: