MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / takeMemory

Function takeMemory

packages/bench/src/measure.ts:113–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111// ── Snapshots ───────────────────────────────────────────────────────
112
113export 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
124export function takeCpu(): CpuUsage {
125 const c = process.cpuUsage();

Callers 8

benchSyncFunction · 0.70
benchAsyncFunction · 0.70
runReziFunction · 0.50
runTermkitFunction · 0.50
runBlessedFunction · 0.50
runReziFunction · 0.50
runTermkitFunction · 0.50
runBlessedFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected