测量带宽使用

On the FRC® Field each team is allocated limited network bandwidth (see R704 in the 2023 manual). The FMS Whitepaper provides more information on determining the bandwidth usage of the Axis camera, but some teams may wish to measure their overall bandwidth consumption. This document details how to make that measurement.

备注

Teams can simulate the bandwidth throttling at home using the FRC Bridge Configuration Utility with the bandwidth checkbox checked.

Measuring Bandwidth Using the Performance Monitor (Win 7/10)

Windows contains a built-in tool called the Performance Monitor that can be used to monitor the bandwidth usage over a network interface.

运行性能监视器

Using the start menu to type "perfmon.msc".

点击“开始”并在搜索栏中输入“perfmon.msc”后按下回车键。

打开实时监控器

Click "Performance Monitor" under "Monitoring Tools" in the tree view.

在左窗格中,单击``性能监视器’’以显示实时监视器。

添加网络计数器

The "Add Counters" screen showinging the steps below.
  1. 点击屏幕顶部附近的绿色加号以添加一个计数器

  2. 在左上窗格中,找到并单击“Network Interface”(网络接口)以选中它

  3. 在左下方窗格中,找到所需的网络接口(或使用“所有实例”监视所有接口)

  4. 单击``添加>>’’将计数器添加到右侧窗格中。

  5. 单击``确定’’以将计数器添加到图形中。

删除额外计数器

Removing the counter at the bottom of the graph screen.

在底部窗格中,选择除“ 字节总数/秒(Bytes Total / sec)”以外的每个计数器,然后按“ Delete”键。 ``字节总数/秒’’条目应是窗格中剩余的唯一条目。

配置数据属性

Scale dropdown highlighted on the Performance Monitor Properties page.

按:kbd:Ctrl+Q 以打开“属性”窗口。单击``比例’’旁边的下拉菜单,然后选择``1.0’’。然后单击``图形’’选项卡。

配置图形特征

Moving to the Graph tab the Maximum field under Vertical Scale is highlighted.

在``垂直比例’’下的``最大框’’中,输入917504(这是7兆字节转换为字节)。如果需要,请选中该框以打开水平网格。然后单击``确定’’关闭对话框。

查看带宽使用情况

Observing the bandwidth usage on the chart screen.

现在,您可以通过所选接口正常连接机器人(如果尚未连接)。该图将显示该连接的总带宽使用情况,带宽上限位于该图的顶部。最后,平均值,最小值和最大值也显示在图形的底部。请注意,这些值以字节/秒为单位,表示上限为917,504。在仅打开Driver Station的情况下,您应该会看到一条〜100000 Bytes / Second的扁平线。

使用Wireshark测量带宽使用情况

If you can not use performance monitor, you will need to install a 3rd party program to monitor bandwidth usage. One program that can be used for this purpose is Wireshark. Download and install the latest version of Wireshark for your version of Windows. After installation is complete, locate and open Wireshark. Connect your computer to your robot, open the Driver Station and any Dashboard or custom programs you may be using.

选择界面并开始捕获

Selecting the Start button and choosing the NIC in Wireshark.

在左侧的Wireshark程序中,选择用于连接到机器人的接口,然后单击``开始’’。

打开统计摘要

In the menu bar at the top choosing "Statistics" then "Summary"

让捕获运行至少1分钟,然后单击“统计”,然后单击“摘要”。

查看带宽使用情况

Looking at the "Avg. MBit/sec" field of the Wireshark summary.

摘要窗口底部附近显示以兆位/秒为单位的平均带宽使用量。