func formatMemory(m report.Metric) (report.Metric, string) { s := m.LastSample() if s == nil { return m, "" } human, divisor := memoryScale(s.Value) return m.Div(divisor), fmt.Sprintf("%0.2f %s", s.Value/divisor, human) }