()
| 111 | // ── Snapshots ─────────────────────────────────────────────────────── |
| 112 | |
| 113 | export function takeMemory(): NodeMemorySnapshot { |
| 114 | const m = process.memoryUsage(); |
| 115 | return { |
| 116 | rssKb: Math.round(m.rss / 1024), |
| 117 | heapUsedKb: Math.round(m.heapUsed / 1024), |
| 118 | heapTotalKb: Math.round(m.heapTotal / 1024), |
| 119 | externalKb: Math.round(m.external / 1024), |
| 120 | arrayBuffersKb: Math.round(m.arrayBuffers / 1024), |
| 121 | }; |
| 122 | } |
| 123 | |
| 124 | export function takeCpu(): CpuUsage { |
| 125 | const c = process.cpuUsage(); |
no outgoing calls
no test coverage detected