(bytes: number)
| 160 | } |
| 161 | |
| 162 | function formatBytes(bytes: number) { |
| 163 | return `${(bytes / 1024 / 1024).toFixed(1)} MiB`; |
| 164 | } |
| 165 | |
| 166 | function linearSlope(samples: MemorySample[], field: "heapUsedBytes" | "rssBytes") { |
| 167 | if (samples.length < 2) { |