A new TraceEvents object is created in:
Before the process exits, the TraceEvents object is destroyed and the trace events are stringified and printed to events.json in:
perftrace/docs/examples/tracing-requires/index.js
Lines 6 to 10 in 7cb1ce3
The require() calls can be tracked by calling trackRequires() like it is being done in:
After running npm ci, run node . and open http://localhost:3000 in your browser. The generated events.json file can be opened on https://ui.perfetto.dev for visualization:
