You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2016/11/07 19:29:59 UTC

[13/21] incubator-trafficcontrol git commit: Fix TM2 /publish/CacheStats values to be strings

Fix TM2 /publish/CacheStats values to be strings


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/25e80eb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/25e80eb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/25e80eb7

Branch: refs/heads/master
Commit: 25e80eb7c45cda0a204559000915aa61ae86d2a1
Parents: 75a9581
Author: Robert Butts <ro...@gmail.com>
Authored: Wed Nov 2 15:17:34 2016 -0600
Committer: Dave Neuman <ne...@apache.org>
Committed: Mon Nov 7 12:29:08 2016 -0700

----------------------------------------------------------------------
 traffic_monitor/experimental/traffic_monitor/cache/cache.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/25e80eb7/traffic_monitor/experimental/traffic_monitor/cache/cache.go
----------------------------------------------------------------------
diff --git a/traffic_monitor/experimental/traffic_monitor/cache/cache.go b/traffic_monitor/experimental/traffic_monitor/cache/cache.go
index 52230d2..33792a9 100644
--- a/traffic_monitor/experimental/traffic_monitor/cache/cache.go
+++ b/traffic_monitor/experimental/traffic_monitor/cache/cache.go
@@ -128,7 +128,7 @@ func StatsMarshall(statHistory map[enum.CacheName][]Result, filter Filter, param
 					stats.Caches[id] = map[string][]Stat{}
 				}
 
-				stats.Caches[id][stat] = append(stats.Caches[id][stat], s)
+				stats.Caches[id][stat] = append(stats.Caches[id][stat], Stat{Time: s.Time, Value: fmt.Sprintf("%v", s.Value)}) // convert stats to strings, for the TM1.0 /publish/CacheStats API
 			}
 		}
 	}