Android device network stress test

Several dimensions of network testing:

  1. network performance
  • Bandwidth: measured by TCP test
  • Latency: Measured with the ping command
  • Datagram Loss: Measured with the Iperf UDP Test
  • Jitter (latency variation): measured with the Iperf UDP test
  • Signal strength (under WIFI): Use Network Signal Info to view
  • network stability
  • You can observe the stability of the network card in continuous tests, and use tools to perform a large number of network access requests to achieve the purpose of stress testing
  • network testing tool

    ping

    Using ping can test the network delay, but the delay is not the most important data for a network card, so no special test is required, but tools can be used to ping the device for a long time and at short intervals. To achieve the purpose of stress testing the network card.

    Under Windows, you can use the pingtester tool and set it to 10ms continuous mode for ping packet testing

    iperf

    Iperf is a network performance testing tool, which can be easily used to test SDN network bandwidth and network quality. Iperf supports configuration adjustment of parameters such as protocol, timing, and buffer, and reports TCP/UDP maximum bandwidth, delay jitter, and data packets. Statistics such as loss.

    Install the apk of iperf on the Android device, install the server tool on the server (Mac, Windows test computer), and then run the corresponding command.

    • iperf test TCP
    • The principle of Iperf testing TCP bandwidth is relatively simple. After the client and the server establish a three-way handshake connection, the size of the client bandwidth is equal to the total data sent divided by the total sending time. For the bandwidth measured by the server, it is the total data received divided by the time spent.
    • Simple example in TCP mode: Server: iperf -s
    • Client: iperf -c 10.0.0.1 -i 1
      Client to server 10.0.0.1 bandwidth test, printing information every second.
    • Iperf test UDP
    • When Iperf tests UDP performance, the client can specify the rate of UDP data flow. When the client sends data, the delay between datagram sending will be calculated according to the rate provided by the client.
    • 客户端还可以指定发送数据报的大小。每个发送的数据报包含一个ID号,用来唯一标识报文,服务器端根据该ID号来确定数据报丢失和乱序。
    • 当把UDP报文大小设置可以将整个报文放入IP层的包(packet)内时,那么UDP所测得的报文丢失数据即为IP层包的丢失数据,这提供了一个有效的测试包丢失情况的方法。
    • 数据报传输延迟抖动 (Jitter)的测试由服务器端完成,客户发送的报文数据包含有发送时间戳,服务器端根据该时间信息和接收到报文的时间戳来计算传输延迟抖动。传输延迟抖动反映传输过程中是否平滑。由于它是一个相对值,所以并不需要客户端和服务器端时间同步。
    • UDP模式下简单举例:Server:iperf -s -u
    • Client:iperf -c 10.0.0.1 -u -b 100M
      在UDP模式下,客户端以100Mbps为数据发送速率,测试客户端到服务器10.0.0.1上的带宽。
    • iperf测试示例
    • Android客户端iperf3 选项卡中输入 -s -d -i 30 (每20s输出报告) 命令启动服务
      测试电脑服务端
      iperf3 -c 192.168.2.136(换成相应IP地址) -t 43200(时间,单位秒) -P 10(线程数)
    • -u(使用UDP, 使用TCP请去掉这个参数)
    • -b 2 (2Mbit/s,使用TCP请去掉这个参数) -i 20 (每20s输出报告) 命令

    Network Signal Info

    可以利用它来进行对比测试,在同一个WIFI信号或3G模式下。对比两台甚至多台机子在同一环境下的WIFI信号值、质量,以此得出WIFI测试下的性能。

     

    原文地址:http://www.51test.space/archives/1949

     

    Guess you like

    Origin http://43.154.161.224:23101/article/api/json?id=326175622&siteId=291194637