简体   繁体   中英

How to simulate slow page load in ASP.NET?

如何模拟ASP.NET中的慢页面加载?

Fiddler can be used to simulate modem ( or other slow speed connections )

Related Question: Is it possible to slow down IIS?

最简单的方法是在页面加载事件处理程序中添加

Threading.Thread.Sleep(numberOfMillisecondsToDelay);

if your application is x-browser you could use a firefox add-on, like Firefox Throttle

https://addons.mozilla.org/en-US/firefox/addon/5917/

or maybe just use firefox for testing if your web application targets a specific browser

Update (9/15/2012): This plugin is no longer active... "This add-on has been disabled by an administrator."

Bandwidth or Latency?

For bandwidth, you can use the Bandwidth Throttling module for IIS6 or IIS7 .

Not sure how to simulate high Latency though.

I would suggest looking at Visual Studio's performance testing capabilities.

Here's a quick guide:

http://vsptqrg.codeplex.com/

Are you trying to determine how your site or app behaves under high load? If so I can recommend jMeter . The advantage of this approach is that you can create different groups of threads which can approximate the behaviour of real users hitting your app.

If you are using Google Chrome. There is a native function on the browser. Press F12 and go to Network tab.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM