func (c *containerStatsContext) MemUsage() string { c.AddHeader(memUseHeader) if c.s.IsInvalid || c.s.OSType == winOSType { return fmt.Sprintf("-- / --") } return fmt.Sprintf("%s / %s", units.BytesSize(c.s.Memory), units.BytesSize(c.s.MemoryLimit)) }
func (m *memBytes) String() string { return units.BytesSize(float64(m.Value())) }
func (ctx *serviceInspectContext) ResourceLimitMemory() string { if ctx.Service.Spec.TaskTemplate.Resources.Limits.MemoryBytes == 0 { return "" } return units.BytesSize(float64(ctx.Service.Spec.TaskTemplate.Resources.Limits.MemoryBytes)) }