弱网测试原理与方法(二)-使用虚拟机模拟网络速率
来源:互联网 发布:yy直播软件下载 编辑:程序博客网 时间:2024/06/05 05:55
通过虚拟机设置不同的网络速率,来测试不同网络类型下应用的反应。
虚拟机允许模拟各种网络传输比率,可以在虚拟机启动时设置传输比率范围。在虚拟机启动时设置网络速率,使用-netspeed选择项与<speed>值,使用-netdelay设置网络延迟的值。
命令如下:
emulator –avd avdName–port avdport –netspeed <speed> -netdelay <delay >
To make changes to network speed while the emulator isrunning, connect to the console and use the netspeed
command with asupported <speed>
value from the table below
更改网络速度在模拟器运行时,连接到控制台,使用netspeed命令支持从下表<速度值>
netspeed <speed> :上行/下载速率
Value
Description
Comments
gsm
GSM/CSD
(Up: 14.4, down: 14.4)
hscsd
HSCSD
(Up: 14.4, down: 43.2)
gprs
GPRS
(Up: 40.0, down: 80.0)
edge
EDGE/EGPRS
(Up: 118.4, down: 236.8)
umts
UMTS/3G
(Up: 128.0, down: 1920.0)
hsdpa
HSDPA
(Up: 348.0, down: 14400.0)
full
no limit
(Up: 0.0, down: 0.0)
<num>
Set an exact rate used for both upload and download.
<up>:<down>
Set exact rates for upload and download separately.
To make changes to network delay while the emulator isrunning, connect to the console and use the netdelay command with asupported <delay> value from the table below.
更改网络延迟在模拟器运行时,连接到控制台,使用netdelay命令支持从下表<延迟>价值。
netdelay <delay>:延迟速度,单位为毫秒
Value
Description
Comments
gprs
GPRS
(min 150, max 550)
edge
EDGE/EGPRS
(min 80, max 400)
umts
UMTS/3G
(min 35, max 200)
none
No latency
(min 0, max 0)
<num>
Emulate an exact latency (milliseconds).
<min>:<max>
Emulate an specified latency range (min, max milliseconds).
命令如下:
emulator –avd avdName–port avdport –netspeed gsm -netdelay gprs
:该模拟器上传下载速率为gsm的值,延迟时间为gprs的值
可以写多条命令来对比不同速率传输应用程序的响应区别
数据来源于android官方网站
- 弱网测试原理与方法(二)-使用虚拟机模拟网络速率
- PC端与ARM端网口速率简单测试方法(jperf与iperfg工具的使用)
- 我的openwrt学习笔记(二十四):WIFI无线传输速率相对测试方法_netcat
- 网络异常模拟测试方法
- 网络异常模拟测试方法
- 网络异常模拟测试方法
- 弱网测试原理以及方法(三)-使用fiddle进行弱网测试
- Android使用Fiddler模拟弱网络环境测试
- 网络原理(二)
- Facebook网络模拟测试工具ATC使用
- Facebook网络模拟测试工具ATC使用
- Facebook网络模拟测试工具ATC使用
- Facebook网络模拟测试工具ATC使用
- X2 8935接口传输速率测试方法
- 网络的两个性能指标:速率与带宽
- 使用iperf测试双机最大传输速率
- 客户端&WEB网络测试方法杂谈(二)
- 敏捷测试(二)敏捷测试的方法与实践
- Eclipse中如何显示行号
- 真正的初学者常用命令
- 自适应 Adapter http live streaming 流媒体实例分析
- 结构体笔记
- iOS开发- 启动动画(动态欢迎界面,非静态Default)
- 弱网测试原理与方法(二)-使用虚拟机模拟网络速率
- 【JVM】深入浅出Java垃圾回收机制
- eclipse从数据库逆向生成Hibernate实体类
- 1000以内的阶乘
- 模板与泛型编程
- 按照工厂日历的日期计算
- activity.this 和context (小结)
- Android进程
- Iptables详解