Profiling
On macOS
Install cargo-instruments
Make sure you have all the prerequisites for running cargo-instruments.
Run the profiler
By default, turbopack-cli dev
will keep watching for changes to your application and never exit until you manually interrupt it. However, cargo-instruments
waits for your program to exit before building and opening the trace file. For this purpose, we've added a profile
feature to turbopack-cli
which exits the program if no updates are detected within a given time frame and there are no pending tasks.
To profile turbopack-cli
, run the following command:
You can also run other templates than the time profiler.
Once the program exits, the profiler will open the trace file in Instruments. Refer to the learning resources to learn how to use Instruments.
Linux
Memory usage
On other platforms
We currently don't have a guide for profiling Turbopack on other platforms.