模拟缓慢的Internet连接 [英] Simulating Slow Internet Connection

查看:116
本文介绍了模拟缓慢的Internet连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是一个奇怪的问题.由于我通常基于假设"来开发应用程序,即所有用户的互联网连接速度都很慢.但是,是否有人认为有一种方法可以通过编程方式模拟缓慢的Internet连接,所以我可以看到"应用程序在各种连接速度"下的性能如何?

I know this is kind of an odd question. Since I usually develop applications based on the "assumption" that all users have a slow internet connection. But, does anybody think that there is a way to programmatically simulate a slow internet connection, so I can "see" how an application performs under various "connection speeds"?

我不担心使用哪种语言.而且我不是在寻找代码示例或任何东西,只是对它背后的逻辑感兴趣.

I'm not worried about which language is used. And I'm not looking for code samples or anything, just interested in the logic behind it.

推荐答案

如果您正在运行Windows,请 fiddler 是一个很棒的工具.它具有模拟调制解调器速度的设置,对于需要更多控制权的人来说,可以使用插件为每个请求增加延迟时间.

If you're running windows, fiddler is a great tool. It has a setting to simulate modem speed, and for someone who wants more control has a plugin to add latency to each request.

我更喜欢使用这样的工具在我的应用程序中放置等待时间代码,因为这是更现实的模拟,并且不让我设计或编写实际位.最好的代码是我不必编写的代码.

I prefer using a tool like this to putting latency code in my application as it is a much more realistic simulation, as well as not making me design or code the actual bits. The best code is code I don't have to write.

添加:Pavel Donchev在Software Technologies上的博客中的这篇文章介绍了如何创建自定义的仿真速度:

ADDED: This article at Pavel Donchev's blog on Software Technologies shows how to create custom simulated speeds: Limiting your Internet connection speed with Fiddler.

这篇关于模拟缓慢的Internet连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆