(bytes: number)
| 43 | } |
| 44 | |
| 45 | function fmtMem(bytes: number): string { |
| 46 | if (bytes == null) return ""; |
| 47 | if (bytes === -1) return "-"; |
| 48 | if (bytes < 1024) return formatNumber4(bytes) + "B"; |
| 49 | if (bytes < 1024 * 1024) return formatNumber4(bytes / 1024) + "K"; |
| 50 | if (bytes < 1024 * 1024 * 1024) return formatNumber4(bytes / 1024 / 1024) + "M"; |
| 51 | return formatNumber4(bytes / 1024 / 1024 / 1024) + "G"; |
| 52 | } |
| 53 | |
| 54 | function fmtCpu(cpu: number): string { |
| 55 | if (cpu == null) return ""; |
no test coverage detected