Github user rob05c commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafficcontrol/pull/99#discussion_r89230928
  
    --- Diff: 
traffic_monitor/experimental/traffic_monitor/manager/datarequest.go ---
    @@ -606,30 +614,30 @@ func srvAPIVersion(staticAppData StaticAppData) 
[]byte {
     func srvAPITrafficOpsURI(opsConfig OpsConfigThreadsafe) []byte {
        return []byte(opsConfig.Get().Url)
     }
    -func srvAPICacheStates(toData todata.TODataThreadsafe, statHistory 
StatHistoryThreadsafe, lastHealthDurations DurationMapThreadsafe, localStates 
peer.CRStatesThreadsafe, lastStats LastStatsThreadsafe, localCacheStatus 
CacheAvailableStatusThreadsafe) ([]byte, error) {
    -   return json.Marshal(createCacheStatuses(toData.Get().ServerTypes, 
statHistory.Get(), lastHealthDurations.Get(), localStates.Get().Caches, 
lastStats.Get(), localCacheStatus))
    +func srvAPICacheStates(toData todata.TODataThreadsafe, statHistory 
ResultHistoryThreadsafe, healthHistory ResultHistoryThreadsafe, 
lastHealthDurations DurationMapThreadsafe, localStates peer.CRStatesThreadsafe, 
lastStats LastStatsThreadsafe, localCacheStatus CacheAvailableStatusThreadsafe) 
([]byte, error) {
    +   return json.Marshal(createCacheStatuses(toData.Get().ServerTypes, 
statHistory.Get(), healthHistory.Get(), lastHealthDurations.Get(), 
localStates.Get().Caches, lastStats.Get(), localCacheStatus))
     }
     
     func srvAPIBandwidthKbps(toData todata.TODataThreadsafe, lastStats 
LastStatsThreadsafe) []byte {
    -   serverTypes := toData.Get().ServerTypes
    +   // serverTypes := toData.Get().ServerTypes
        kbpsStats := lastStats.Get()
        sum := float64(0.0)
    -   for cache, data := range kbpsStats.Caches {
    -           if serverTypes[cache] != enum.CacheTypeEdge {
    -                   continue
    -           }
    +   for _, data := range kbpsStats.Caches {
    +           // if serverTypes[cache] != enum.CacheTypeEdge {
    --- End diff --
    
    Ok, I'll just remove the commented code then.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to