Move setGaugeForAllocationStats to emitClientMetrics

This commit is contained in:
Chelsea Holland Komlo 2017-09-25 16:05:49 +00:00
parent 6c0836c40a
commit b26454cf99
1 changed files with 2 additions and 3 deletions

View File

@ -2039,15 +2039,14 @@ func (c *Client) emitHostStats() {
c.setGaugeForUptime(hStats)
c.setGaugeForCPUStats(nodeID, hStats)
c.setGaugeForDiskStats(nodeID, hStats)
// TODO: This should be moved to emitClientMetrics
c.setGaugeForAllocationStats(nodeID)
}
// emitClientMetrics emits lower volume client metrics
func (c *Client) emitClientMetrics() {
nodeID := c.NodeID()
c.setGaugeForAllocationStats(nodeID)
// Emit allocation metrics
blocked, migrating, pending, running, terminal := 0, 0, 0, 0, 0
for _, ar := range c.getAllocRunners() {