Github user dneuman64 commented on a diff in the pull request:
https://github.com/apache/incubator-trafficcontrol/pull/99#discussion_r89230538
--- 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 --
Yeah, the mids should be included in the bandwidth.
---
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.
---