Using humanize to convert memory usage to MB
This commit is contained in:
parent
2d3798b076
commit
d9d5a95160
|
@ -365,7 +365,7 @@ func (c *AllocStatusCommand) taskResources(alloc *api.Allocation, stats map[stri
|
|||
cpuUsage = fmt.Sprintf("%v/%v", math.Floor(cs.Ticks), resource.CPU)
|
||||
}
|
||||
if ms := ru.ResourceUsage.MemoryStats; ms != nil {
|
||||
memUsage = fmt.Sprintf("%v/%v", ms.RSS/(1024*1024), resource.MemoryMB)
|
||||
memUsage = fmt.Sprintf("%v/%v", humanize.Bytes(ms.RSS), resource.MemoryMB)
|
||||
}
|
||||
}
|
||||
resourcesOutput = append(resourcesOutput, fmt.Sprintf("%v|%v MB|%v MB|%v|%v",
|
||||
|
|
Loading…
Reference in New Issue