How To Collect a CPU Profile
how_to_collectGet a ready-to-run command and step-by-step recipe for capturing a V8 CPU profile and loading it with load_profile. Choose the scenario matching your Next.js or Node.js execution.
Instructions
Returns a ready-to-run command and step-by-step recipe for capturing a V8 CPU profile, then loading it with load_profile. Use this when you do not yet have a .cpuprofile file. Choose the scenario that matches how the code runs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scenario | No | How the code under test runs. "next-server" (default) profiles a Next.js production server; "script" profiles a Next.js standalone server.js (or another Node entry). |