// Run with Node --cpu-prof / --heap-prof; profiles belong in ignored artifacts. import {createRequire} from 'node:module'; import {performance} from 'node:perf_hooks'; const require=createRequire(import.meta.url); for(const name of ['diagnostics.cjs','inspect-text-representations.cjs']){ const before=process.memoryUsage(),started=performance.now(); require('../apps/browser/'+name); const after=process.memoryUsage(); console.log(JSON.stringify({module:name,loadMs:Number((performance.now()-started).toFixed(3)),heapDeltaBytes:after.heapUsed-before.heapUsed,rssDeltaBytes:after.rss-before.rss})); }