From 088b3ad37eace8355771da47f4a7e8c044eb90de Mon Sep 17 00:00:00 2001 From: Nicholas Dal Porto Date: Sun, 29 Oct 2017 22:07:29 -0700 Subject: [PATCH 1/2] Swapped units on bandwidth monitoring to Megabits rather than Megabytes, so utilization is more easily quantified. --- field/bandwidth_monitor.go | 4 ++-- templates/fta_display.html | 4 ++-- templates/match_play.html | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/field/bandwidth_monitor.go b/field/bandwidth_monitor.go index 129752a..65ed0b2 100644 --- a/field/bandwidth_monitor.go +++ b/field/bandwidth_monitor.go @@ -117,7 +117,7 @@ func (monitor *BandwidthMonitor) updateStationBandwidth(station string, oidIndex return } lastToRobotBytesForPort := uint32(monitor.lastToRobotBytes[toOid].(wapsnmp.Counter)) - dsConn.MBpsToRobot = float64(toRobotBytesForPort-lastToRobotBytesForPort) / 1024 / 1024 / secondsSinceLast + dsConn.MBpsToRobot = float64(toRobotBytesForPort-lastToRobotBytesForPort) / 1024 / 128 / secondsSinceLast fromOid := monitor.fromRobotOids[oidIndex].String() if _, ok := fromRobotBytes[fromOid]; !ok { @@ -130,5 +130,5 @@ func (monitor *BandwidthMonitor) updateStationBandwidth(station string, oidIndex return } lastFromRobotBytesForPort := uint32(monitor.lastFromRobotBytes[fromOid].(wapsnmp.Counter)) - dsConn.MBpsFromRobot = float64(fromRobotBytesForPort-lastFromRobotBytesForPort) / 1024 / 1024 / secondsSinceLast + dsConn.MBpsFromRobot = float64(fromRobotBytesForPort-lastFromRobotBytesForPort) / 1024 / 128 / secondsSinceLast } diff --git a/templates/fta_display.html b/templates/fta_display.html index 689a35b..b6e78b1 100644 --- a/templates/fta_display.html +++ b/templates/fta_display.html @@ -12,7 +12,7 @@
Red Teams
-
DS
+
DS
Rad
Rio
Bat
@@ -27,7 +27,7 @@