vincentalfred commented on a change in pull request #3982: Add Traffic Monitor 
gbps calculated stat.
URL: https://github.com/apache/trafficcontrol/pull/3982#discussion_r334056340
 
 

 ##########
 File path: traffic_monitor/cache/cache.go
 ##########
 @@ -154,6 +154,9 @@ func ComputedStats() map[string]StatComputeFunc {
                "kbps": func(info ResultInfo, serverInfo tc.TrafficServer, 
serverProfile tc.TMProfile, combinedState tc.IsAvailable) interface{} {
                        return info.Vitals.KbpsOut
                },
+               "gbps": func(info ResultInfo, serverInfo tc.TrafficServer, 
serverProfile tc.TMProfile, combinedState tc.IsAvailable) interface{} {
+                       return info.Vitals.KbpsOut / 1000000
 
 Review comment:
   I'm gonna cast it as float64 just to be safe.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to